1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

feat: Add disable_password field to CustomUserDetailsSerializer and update PublicUserListView

This commit is contained in:
Sean Morley 2025-03-17 14:38:10 -04:00
parent 3b6d437f29
commit 585f050a30
2 changed files with 3 additions and 2 deletions

View file

@ -96,7 +96,7 @@ class CustomUserDetailsSerializer(UserDetailsSerializer):
class Meta(UserDetailsSerializer.Meta):
model = CustomUser
fields = UserDetailsSerializer.Meta.fields + ['profile_pic', 'uuid', 'public_profile', 'has_password']
fields = UserDetailsSerializer.Meta.fields + ['profile_pic', 'uuid', 'public_profile', 'has_password', 'disable_password']
read_only_fields = UserDetailsSerializer.Meta.read_only_fields + ('uuid', 'has_password', 'disable_password')
@staticmethod
@ -122,5 +122,5 @@ class CustomUserDetailsSerializer(UserDetailsSerializer):
representation.pop('pk', None)
# Remove the email field
representation.pop('email', None)
return representation