diff options
author | 2019-10-12 00:07:45 +0200 | |
---|---|---|
committer | 2019-10-12 00:07:45 +0200 | |
commit | f357084f15d27b2dea141eccdb86cde61c495ce6 (patch) | |
tree | d4a7cef40dcefcb4f3873e159127ee1b310af7d1 /pydis_site/apps/api/models/bot | |
parent | Update favicons (rounded corners, other improvements) (diff) | |
parent | Merge pull request #280 from python-discord/fix-home-responsive (diff) |
Merge branch 'master' into favicons
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})" |