Skip to content

Commit ad3c41d

Browse files
JasonGrace2282NotFish232
authored andcommitted
Add __str__
1 parent 4879190 commit ad3c41d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

manager/director/apps/sites/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ class Operation(models.Model):
798798
created_time = models.DateTimeField(auto_now_add=True, null=False)
799799
started_time = models.DateTimeField(null=True)
800800

801+
def __str__(self) -> str:
802+
return f"{type(self).__name__}({self.site}, {self.type})"
803+
801804
@property
802805
def has_started(self) -> bool:
803806
return self.started_time is not None

0 commit comments

Comments
 (0)