Skip to content

Commit

Permalink
API v3: don't inherit from flex fields when no needed (#11745)
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd authored Nov 6, 2024
1 parent 7c51438 commit 0e4a305
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions readthedocs/api/v3/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from readthedocs.redirects.validators import validate_redirect


class UserSerializer(FlexFieldsModelSerializer):
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = [
Expand Down Expand Up @@ -331,7 +331,7 @@ def get_documentation(self, obj):
)


class VersionSerializer(FlexFieldsModelSerializer):
class VersionSerializer(serializers.ModelSerializer):
aliases = serializers.SerializerMethodField()
ref = serializers.CharField()
downloads = serializers.SerializerMethodField()
Expand Down Expand Up @@ -586,7 +586,7 @@ def get_notifications(self, obj):
return self._absolute_url(path)


class ProjectCreateSerializerBase(TaggitSerializer, FlexFieldsModelSerializer):
class ProjectCreateSerializerBase(TaggitSerializer, serializers.ModelSerializer):

"""Serializer used to Import a Project."""

Expand Down Expand Up @@ -679,7 +679,7 @@ class ProjectCreateSerializer(SettingsOverrideObject):
_default_class = ProjectCreateSerializerBase


class ProjectUpdateSerializerBase(TaggitSerializer, FlexFieldsModelSerializer):
class ProjectUpdateSerializerBase(TaggitSerializer, serializers.ModelSerializer):

"""Serializer used to modify a Project once imported."""

Expand Down Expand Up @@ -936,7 +936,7 @@ class Meta(ProjectSerializer.Meta):
]


class SubprojectSerializer(FlexFieldsModelSerializer):
class SubprojectSerializer(serializers.ModelSerializer):

"""Serializer to render a subproject (``ProjectRelationship``)."""

Expand All @@ -952,7 +952,7 @@ class Meta:
]


class SubprojectDestroySerializer(FlexFieldsModelSerializer):
class SubprojectDestroySerializer(serializers.ModelSerializer):

"""Serializer used to remove a subproject relationship to a Project."""

Expand Down

0 comments on commit 0e4a305

Please sign in to comment.