Skip to content

Commit

Permalink
fix: add string representation for site
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Oct 2, 2024
1 parent 80700f6 commit 5ee0787
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions terraso_backend/apps/project_management/models/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class Meta(BaseModel.Meta):
default=False,
)

def __str__(self):
return f"{self.name} ({self.id})"

@property
def is_unaffiliated(self):
return self.owner is not None
Expand Down

0 comments on commit 5ee0787

Please sign in to comment.