diff options
author | 2019-10-18 12:34:09 +0200 | |
---|---|---|
committer | 2019-10-18 12:34:09 +0200 | |
commit | 6670a3ba48dad0b2e6e79d77d780c5ee77773e3e (patch) | |
tree | 30fdc507353e902f194fa84bfcb7516ea72903fd /pydis_site/apps/api/models/bot | |
parent | Prevent double active infractions with constraint (diff) | |
parent | Add Code of Conduct to navbar submenu (diff) |
Merge branch 'master' into active-infractions-validation
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})" |