Skip to content

Commit

Permalink
Make string related fields read only
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Apr 12, 2023

Verified

This commit was signed with the committer’s verified signature.
k4yt3x K4YT3X
1 parent 648bc4a commit 58aed8d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions reader/serializers.py
Original file line number Diff line number Diff line change
@@ -54,7 +54,8 @@ class ChapterSerializer(ModelSerializer):
slug_field='slug', help_text='The series of the chapter.'
)
groups = StringRelatedField(
many=True, help_text='The scanlation groups of the chapter.'
many=True, read_only=True,
help_text='The scanlation groups of the chapter.'
) # type: StringRelatedField
url = URLField(
source='get_absolute_url', read_only=True,
@@ -163,19 +164,19 @@ class _SeriesDetailSerializer(ModelSerializer):
help_text='The total chapter views of the series.'
)
aliases = StringRelatedField(
many=True, required=False,
many=True, required=False, read_only=True,
help_text='The alternative titles of the series.'
) # type: StringRelatedField
authors = StringRelatedField(
many=True, required=False,
many=True, required=False, read_only=True,
help_text='The authors of the series.'
) # type: StringRelatedField
artists = StringRelatedField(
many=True, required=False,
many=True, required=False, read_only=True,
help_text='The artists of the series.'
) # type: StringRelatedField
categories = StringRelatedField(
many=True, required=False,
many=True, required=False, read_only=True,
help_text='The categories of the series.'
) # type: StringRelatedField
url = URLField(

0 comments on commit 58aed8d

Please sign in to comment.