diff options
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r-- | pydis_site/apps/api/models/bot/allowlist.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/pydis_site/apps/api/models/bot/allowlist.py b/pydis_site/apps/api/models/bot/allowlist.py index c8fa2e33..b0aea066 100644 --- a/pydis_site/apps/api/models/bot/allowlist.py +++ b/pydis_site/apps/api/models/bot/allowlist.py @@ -1,23 +1,21 @@ from django.db import models -from pydis_site.apps.api.models import ModelReprMixin, ModelTimestampMixin +from pydis_site.apps.api.models.mixins import ModelReprMixin, ModelTimestampMixin class AllowList(ModelTimestampMixin, ModelReprMixin, models.Model): """An item that is either allowed or denied.""" AllowListType = models.TextChoices( - 'guild_invite_id', - 'file_format', - 'domain_name', - 'word_watchlist', + 'AllowListType', + 'GUILD_INVITE_ID ' + 'FILE_FORMAT ' + 'DOMAIN_NAME ' + 'WORD_WATCHLIST ' ) type = models.CharField( max_length=50, - help_text=( - "The type of allowlist this is on. The value must be one of the following: " - f"{','.join(AllowListType.choices)}." - ), + help_text="The type of allowlist this is on.", choices=AllowListType.choices, ) allowed = models.BooleanField( |