Skip to content

Commit

Permalink
trying to implement returning partial objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ohi-711 committed Nov 30, 2023
1 parent be03457 commit d2aaa31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/api/views/objects/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def create(self, validated_data) -> User:
return user

class Meta:
'''gravatar_url = serializers.SerializerMethodField(read_only=True)'''
gravatar_url = serializers.SerializerMethodField(read_only=True)
model = User
fields = [
"first_name",
Expand All @@ -166,9 +166,9 @@ class Meta:
"tags_following",
]

''' @staticmethod
@staticmethod
def get_gravatar_url(obj: User):
return gravatar_url(obj.email)'''
return gravatar_url(obj.email)


class Identity(permissions.BasePermission):
Expand Down

0 comments on commit d2aaa31

Please sign in to comment.