Skip to content

Commit

Permalink
Add __str__
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGrace2282 authored and NotFish232 committed Oct 8, 2024
1 parent 4879190 commit ad3c41d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manager/director/apps/sites/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,9 @@ class Operation(models.Model):
created_time = models.DateTimeField(auto_now_add=True, null=False)
started_time = models.DateTimeField(null=True)

def __str__(self) -> str:
return f"{type(self).__name__}({self.site}, {self.type})"

@property
def has_started(self) -> bool:
return self.started_time is not None
Expand Down

0 comments on commit ad3c41d

Please sign in to comment.