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:
parent
3b6d437f29
commit
585f050a30
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue