Skip to content

Commit

Permalink
Fix flaky __str__ method on Log model
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic authored and gasman committed Feb 26, 2024
1 parent 9d5bb22 commit 4c99432
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ class Log(ClusterableModel):
data = models.CharField(max_length=255)

def __str__(self):
if self.time is None:
return "[None] %s" % self.data
return "[%s] %s" % (self.time.isoformat(), self.data)


Expand Down

0 comments on commit 4c99432

Please sign in to comment.