Skip to content

Commit 58aed8d

Browse files
Make string related fields read only
1 parent 648bc4a commit 58aed8d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

reader/serializers.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ class ChapterSerializer(ModelSerializer):
5454
slug_field='slug', help_text='The series of the chapter.'
5555
)
5656
groups = StringRelatedField(
57-
many=True, help_text='The scanlation groups of the chapter.'
57+
many=True, read_only=True,
58+
help_text='The scanlation groups of the chapter.'
5859
) # type: StringRelatedField
5960
url = URLField(
6061
source='get_absolute_url', read_only=True,
@@ -163,19 +164,19 @@ class _SeriesDetailSerializer(ModelSerializer):
163164
help_text='The total chapter views of the series.'
164165
)
165166
aliases = StringRelatedField(
166-
many=True, required=False,
167+
many=True, required=False, read_only=True,
167168
help_text='The alternative titles of the series.'
168169
) # type: StringRelatedField
169170
authors = StringRelatedField(
170-
many=True, required=False,
171+
many=True, required=False, read_only=True,
171172
help_text='The authors of the series.'
172173
) # type: StringRelatedField
173174
artists = StringRelatedField(
174-
many=True, required=False,
175+
many=True, required=False, read_only=True,
175176
help_text='The artists of the series.'
176177
) # type: StringRelatedField
177178
categories = StringRelatedField(
178-
many=True, required=False,
179+
many=True, required=False, read_only=True,
179180
help_text='The categories of the series.'
180181
) # type: StringRelatedField
181182
url = URLField(

0 commit comments

Comments
 (0)