Browse Source

feat(account): add slug field to user profile serializer

master
mortezaei 7 months ago
parent
commit
712bb5ae27
  1. 4
      apps/account/serializers/user.py

4
apps/account/serializers/user.py

@ -23,8 +23,8 @@ class UserProfileSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['id', 'device_id', 'fcm', 'fullname', 'avatar', 'email', 'phone_number', 'password', 'info', 'skill', 'city', 'country', 'birthdate', 'gender']
read_only_fields = ['email', 'info', 'skill', 'device_id']
fields = ['id', 'device_id', 'fcm', 'fullname', 'slug', 'avatar', 'email', 'phone_number', 'password', 'info', 'skill', 'city', 'country', 'birthdate', 'gender']
read_only_fields = ['email', 'info', 'skill', 'device_id', 'slug']
# def validate_email(self, value):
# if User.objects.filter(email=value).exists():

Loading…
Cancel
Save