Skip to content

Commit

Permalink
fix(relations): drop the model field from the RelationSerializer
Browse files Browse the repository at this point in the history
The SimpleObjectSerializer does not inherit from the ModelSerializer
anymore, therefore it does not need the model set in the Meta class.
  • Loading branch information
b1rger committed Sep 16, 2024
1 parent e0eaebb commit 2f1e549
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions apis_core/relations/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from rest_framework.serializers import SerializerMethodField

from apis_core.generic.serializers import SimpleObjectSerializer, serializer_factory
from apis_core.relations.models import Relation


class RelationSerializer(SimpleObjectSerializer):
Expand All @@ -11,7 +10,6 @@ class RelationSerializer(SimpleObjectSerializer):

class Meta:
fields = SimpleObjectSerializer.Meta.fields + ["subj", "obj"]
model = Relation

@extend_schema_field(SimpleObjectSerializer())
def get_subj(self, obj):
Expand Down

0 comments on commit 2f1e549

Please sign in to comment.