Skip to content

Commit

Permalink
fix: revert student serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutV committed Mar 5, 2024
1 parent f9c3400 commit a4a5a1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions backend/api/serializers/student_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class StudentSerializer(serializers.ModelSerializer):
read_only=True,
)

faculties = serializers.HyperlinkedRelatedField(
many=True, read_only=True, view_name="faculty-detail"
)

class Meta:
model = Student
fields = '__all__'
6 changes: 0 additions & 6 deletions backend/authentication/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,3 @@ class Meta:
def get_or_create(self, validated_data: dict) -> Tuple[User, bool]:
"""Create or fetch the user based on the validated data."""
return User.objects.get_or_create(**validated_data)


class FacultySerializer(ModelSerializer):
class Meta:
model = Faculty
fields = "__all__"

0 comments on commit a4a5a1e

Please sign in to comment.