diff options
author | 2019-10-11 22:32:46 +0100 | |
---|---|---|
committer | 2019-10-11 22:32:46 +0100 | |
commit | 689a5d9c41395a7da644b25c1e3eab95c2614604 (patch) | |
tree | b535dc93dbf84e076f663a29cd9c44abdada61d4 /pydis_site/apps/api/models/bot | |
parent | Signals: Handle (and test) mapping updates/deletions (diff) | |
parent | Merge pull request #281 from python-discord/simple-admin-log-entry-view (diff) |
Merge branch 'master' into #201-django-allauth
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r-- | pydis_site/apps/api/models/bot/nomination.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/nomination.py b/pydis_site/apps/api/models/bot/nomination.py index 8a8f4d36..cd9951aa 100644 --- a/pydis_site/apps/api/models/bot/nomination.py +++ b/pydis_site/apps/api/models/bot/nomination.py @@ -39,3 +39,8 @@ class Nomination(ModelReprMixin, models.Model): help_text="When the nomination was ended.", null=True ) + + def __str__(self): + """Representation that makes the target and state of the nomination immediately evident.""" + status = "active" if self.active else "ended" + return f"Nomination of {self.user} ({status})" |