Skip to content

Commit

Permalink
Remove unnecessary serializer field
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Feb 22, 2024
1 parent 34343de commit 9bf6068
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions codeforlife/user/serializers/student.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ class StudentSerializer(ModelSerializer[Student]):
source="class_field.teacher.school.id", read_only=True
)

pending_class_request = serializers.CharField(
source="pending_class_request.access_code", read_only=True
)

# pylint: disable-next=missing-class-docstring,too-few-public-methods
class Meta:
model = Student
fields = ["id", "klass", "school", "pending_class_request"]
fields = ["id", "klass", "school"]
extra_kwargs = {"id": {"read_only": True}}

0 comments on commit 9bf6068

Please sign in to comment.