Skip to content

Commit

Permalink
fix: add string representation for Membership object
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Aug 31, 2023
1 parent 658968f commit 6e2fd35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions terraso_backend/apps/core/models/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ class Membership(BaseModel):

objects = MembershipObjectsManager()

def __str__(self):
return f"u:{self.user} g:{self.group.name} r:{self.user_role} s:{self.membership_status}"

class Meta:
constraints = (
models.UniqueConstraint(
Expand Down

0 comments on commit 6e2fd35

Please sign in to comment.