diff options
author | 2020-10-10 19:14:36 +0300 | |
---|---|---|
committer | 2020-10-10 19:14:36 +0300 | |
commit | 511152c0a91ae81949941ff9d8f8129f01338173 (patch) | |
tree | 0313d381f6c616edd03c88f92809931629ab80f0 /pydis_site | |
parent | Add voice ban to infraction types and create migration for it (diff) |
Don't allow voice ban to be hidden infraction
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/api/serializers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pydis_site/apps/api/serializers.py b/pydis_site/apps/api/serializers.py index 25c5c82e..10eb3839 100644 --- a/pydis_site/apps/api/serializers.py +++ b/pydis_site/apps/api/serializers.py @@ -167,7 +167,7 @@ class InfractionSerializer(ModelSerializer): raise ValidationError({'expires_at': [f'{infr_type} infractions cannot expire.']}) hidden = attrs.get('hidden') - if hidden and infr_type in ('superstar', 'warning'): + if hidden and infr_type in ('superstar', 'warning', 'voice_ban'): raise ValidationError({'hidden': [f'{infr_type} infractions cannot be hidden.']}) if not hidden and infr_type in ('note', ): |