When creating custom presets, the /api/compiler is including the presets for each platforms, however when serialiazing the owner field a KeyError is raised.
As visible in the code bellow, we are tyring to get the request from the context.
However, in this specific context (serialiazing the owner field of a custom preset we include for a platform), it is not available.
We can clearly notice however that the serialize_profile function is not using the request argument we are sending, it uses the profile only. Therefore an easy fix is to remove the request.
Description
When creating custom presets, the
/api/compiler
is including the presets for each platforms, however when serialiazing the owner field a KeyError is raised.As visible in the code bellow, we are tyring to get the
request
from the context.https://github.com/decompme/decomp.me/blob/294a2dc1b9fe1d6a033e07d88c92bf4a885d4769/backend/coreapp/serializers.py#L56-L58
However, in this specific context (serialiazing the owner field of a custom preset we include for a platform), it is not available.![image](https://github.com/decompme/decomp.me/assets/42176370/15fedae6-4510-4b66-bf23-71e56f7ad68a)
We can clearly notice however that the
serialize_profile
function is not using the request argument we are sending, it uses theprofile
only. Therefore an easy fix is to remove the request.Tests