aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps
diff options
context:
space:
mode:
authorGravatar Boris Muratov <[email protected]>2023-04-06 19:38:20 +0300
committerGravatar Boris Muratov <[email protected]>2023-04-06 19:38:20 +0300
commitc91bbccd85f64333a720a594435f9c7d33d9889d (patch)
treecd39e41f85fd23ecf98dff455f36a9442a4fdc87 /pydis_site/apps
parentMerge pull request #861 from python-discord/new-filter-schema (diff)
Fix contents and descriptions being too long for their field type
Diffstat (limited to 'pydis_site/apps')
-rw-r--r--pydis_site/apps/api/migrations/0088_new_filter_schema.py4
-rw-r--r--pydis_site/apps/api/models/bot/filters.py5
2 files changed, 4 insertions, 5 deletions
diff --git a/pydis_site/apps/api/migrations/0088_new_filter_schema.py b/pydis_site/apps/api/migrations/0088_new_filter_schema.py
index 675fdcec..9bc40779 100644
--- a/pydis_site/apps/api/migrations/0088_new_filter_schema.py
+++ b/pydis_site/apps/api/migrations/0088_new_filter_schema.py
@@ -103,8 +103,8 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
- ('content', models.CharField(help_text='The definition of this filter.', max_length=100)),
- ('description', models.CharField(help_text='Why this filter has been added.', max_length=200, null=True)),
+ ('content', models.TextField(help_text='The definition of this filter.')),
+ ('description', models.TextField(help_text='Why this filter has been added.', null=True)),
('additional_settings', models.JSONField(help_text='Additional settings which are specific to this filter.', default=dict)),
('guild_pings', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text='Who to ping when this filter triggers.', size=None, null=True)),
('filter_dm', models.BooleanField(help_text='Whether DMs should be filtered.', null=True)),
diff --git a/pydis_site/apps/api/models/bot/filters.py b/pydis_site/apps/api/models/bot/filters.py
index 71f8771f..620031dc 100644
--- a/pydis_site/apps/api/models/bot/filters.py
+++ b/pydis_site/apps/api/models/bot/filters.py
@@ -126,9 +126,8 @@ class FilterList(ModelTimestampMixin, ModelReprMixin, models.Model):
class FilterBase(ModelTimestampMixin, ModelReprMixin, models.Model):
"""One specific trigger of a list."""
- content = models.CharField(max_length=100, help_text="The definition of this filter.")
- description = models.CharField(
- max_length=200,
+ content = models.TextField(help_text="The definition of this filter.")
+ description = models.TextField(
help_text="Why this filter has been added.", null=True
)
additional_settings = models.JSONField(