mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Omit student_status from user serializer
This commit is contained in:
parent
fd08e3c58a
commit
e8693547cf
1 changed files with 3 additions and 3 deletions
|
@ -15,8 +15,8 @@ from django.contrib.gis.geos import Point
|
||||||
|
|
||||||
|
|
||||||
class CustomUserSerializer(BaseUserSerializer):
|
class CustomUserSerializer(BaseUserSerializer):
|
||||||
user_status = StudentStatusSerializer(
|
# user_status = StudentStatusSerializer(
|
||||||
source='studentstatus', read_only=True)
|
# source='studentstatus', read_only=True)
|
||||||
course = serializers.SlugRelatedField(
|
course = serializers.SlugRelatedField(
|
||||||
many=False, slug_field='name', queryset=Course.objects.all(), required=False, allow_null=True)
|
many=False, slug_field='name', queryset=Course.objects.all(), required=False, allow_null=True)
|
||||||
year_level = serializers.SlugRelatedField(
|
year_level = serializers.SlugRelatedField(
|
||||||
|
@ -27,7 +27,7 @@ class CustomUserSerializer(BaseUserSerializer):
|
||||||
class Meta(BaseUserSerializer.Meta):
|
class Meta(BaseUserSerializer.Meta):
|
||||||
model = CustomUser
|
model = CustomUser
|
||||||
fields = ('username', 'email',
|
fields = ('username', 'email',
|
||||||
'student_id_number', 'year_level', 'semester', 'course', 'subjects', 'avatar', 'first_name', 'last_name', 'is_banned', 'user_status')
|
'student_id_number', 'year_level', 'semester', 'course', 'subjects', 'avatar', 'first_name', 'last_name', 'is_banned')
|
||||||
read_only_fields = ('is_banned', 'user_status')
|
read_only_fields = ('is_banned', 'user_status')
|
||||||
|
|
||||||
# The model from your custom user
|
# The model from your custom user
|
||||||
|
|
Loading…
Reference in a new issue