diff options
author | 2019-10-20 05:43:21 +1000 | |
---|---|---|
committer | 2019-10-20 05:43:21 +1000 | |
commit | 618610fe367b0c8d6175d251c276c2e37db8aa52 (patch) | |
tree | a9c343422b8111ace4bf71aa0203e19100d1b5ea /pydis_site/apps/api/models | |
parent | Add message log links, improved formatting to message deletion admin pages. (diff) |
Order roles by positioning, add filters and search to api user admin page.
Diffstat (limited to 'pydis_site/apps/api/models')
-rw-r--r-- | pydis_site/apps/api/models/bot/role.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pydis_site/apps/api/models/bot/role.py b/pydis_site/apps/api/models/bot/role.py index 58bbf8b4..b95740da 100644 --- a/pydis_site/apps/api/models/bot/role.py +++ b/pydis_site/apps/api/models/bot/role.py @@ -65,3 +65,8 @@ class Role(ModelReprMixin, models.Model): def __le__(self, other: Role) -> bool: """Compares the roles based on their position in the role hierarchy of the guild.""" return self.position <= other.position + + class Meta: + """Set role ordering from highest to lowest position.""" + + ordering = ("-position",) |