Skip to content

Commit

Permalink
Add __str__ for events too
Browse files Browse the repository at this point in the history
  • Loading branch information
ewjoachim committed Aug 8, 2024
1 parent 7a6c2a4 commit ed99be3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions procrastinate/contrib/django/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ class Meta: # type: ignore
db_table = "procrastinate_events"
get_latest_by = "at"

def __str__(self) -> str:
return f"Event {self.id} - Job {self.job_id}: {self.type} at {self.at}" # type: ignore


class ProcrastinatePeriodicDefer(ProcrastinateReadOnlyModelMixin, models.Model):
id = models.BigAutoField(primary_key=True)
Expand Down

0 comments on commit ed99be3

Please sign in to comment.