diff options
author | 2019-10-20 06:33:35 +1000 | |
---|---|---|
committer | 2019-10-20 06:33:35 +1000 | |
commit | 1c41c8a1aa07d7a716561c7594f769db7aa58cf5 (patch) | |
tree | 9dcfe6398537b527870c5fb0c138f75b30b7af44 /pydis_site/apps/api/models | |
parent | Improve infractions admin list and page, add search and filters. (diff) |
Improve nominations admin list and page, add search and filter by active.
Diffstat (limited to 'pydis_site/apps/api/models')
-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 cd9951aa..a0ba42a3 100644 --- a/pydis_site/apps/api/models/bot/nomination.py +++ b/pydis_site/apps/api/models/bot/nomination.py @@ -44,3 +44,8 @@ class Nomination(ModelReprMixin, models.Model): """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})" + + class Meta: + """Set the ordering of nominations to most recent first.""" + + ordering = ("-inserted_at",) |