diff options
author | 2023-04-06 01:09:09 +0300 | |
---|---|---|
committer | 2023-04-06 01:09:09 +0300 | |
commit | b8ddedc31d54f46bb86a7e7d200c163ea8806ee0 (patch) | |
tree | b4a59f877895a4edcd6282917357972b2c8a3ff5 /pydis_site/apps/api/models/bot | |
parent | Add maximum auto-timeout duration validation (diff) |
Make additional_settings non-null with dict default
This makes sure that the value in the DB is always a valid JSON, ensuring the unique constraint will work properly.
Diffstat (limited to 'pydis_site/apps/api/models/bot')
-rw-r--r-- | pydis_site/apps/api/models/bot/filters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pydis_site/apps/api/models/bot/filters.py b/pydis_site/apps/api/models/bot/filters.py index aadb39aa..71f8771f 100644 --- a/pydis_site/apps/api/models/bot/filters.py +++ b/pydis_site/apps/api/models/bot/filters.py @@ -132,7 +132,7 @@ class FilterBase(ModelTimestampMixin, ModelReprMixin, models.Model): help_text="Why this filter has been added.", null=True ) additional_settings = models.JSONField( - null=True, help_text="Additional settings which are specific to this filter." + help_text="Additional settings which are specific to this filter.", default=dict ) filter_list = models.ForeignKey( FilterList, models.CASCADE, related_name="filters", |