aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar scragly <[email protected]>2020-09-20 05:02:48 +1000
committerGravatar scragly <[email protected]>2020-09-20 05:02:48 +1000
commit715dd46aa68358cdd2abee07b018ee08e54da8d9 (patch)
treea1f991348d5e959248a03aa06e9986d2e20f7f2a
parentChange UserTopRoleFilter to UserRoleFilter. (diff)
Allow Nomination end_reason to have a blank value for validation.
Without `blank=True`, admin page editable forms could not be saved if no content was in the end_reason input.
-rw-r--r--pydis_site/apps/api/models/bot/nomination.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pydis_site/apps/api/models/bot/nomination.py b/pydis_site/apps/api/models/bot/nomination.py
index 54f56c98..11b9e36e 100644
--- a/pydis_site/apps/api/models/bot/nomination.py
+++ b/pydis_site/apps/api/models/bot/nomination.py
@@ -34,7 +34,8 @@ class Nomination(ModelReprMixin, models.Model):
)
end_reason = models.TextField(
help_text="Why the nomination was ended.",
- default=""
+ default="",
+ blank=True
)
ended_at = models.DateTimeField(
auto_now_add=False,