Skip to content

Commit

Permalink
chore: Fix bug ListEnterpriseGroupSerializer
Browse files Browse the repository at this point in the history
  • Loading branch information
phuongntt-cystack committed Jan 31, 2024
1 parent a66899e commit f4abf10
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions locker_server/api/v1_enterprise/enterprise_groups/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ def to_representation(self, instance):
"name": instance.name,
"creation_date": instance.creation_date,
"revision_date": instance.revision_date,
"created_by": {
"email": instance.created_by.email,
"username": instance.created_by.username,
"full_name": instance.created_by.full_name,
"avatar": instance.created_by.get_avatar()
},
"number_members": number_members
}
created_by = instance.created_by
if created_by:
data["created_by"] = {
"email": created_by.email,
"username": created_by.username,
"full_name": created_by.full_name,
"avatar": created_by.get_avatar()
}
return data


Expand Down

0 comments on commit f4abf10

Please sign in to comment.