aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-20 10:51:06 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-20 10:51:06 +0100
commit3b45be81969ce3dc2b50119bd7bcae3c18ef5e01 (patch)
tree9da801af6c48a6727c8afb329706d74beef6d8f2 /api
parentMerge branch 'django' into django+add-logs-api (diff)
Allow message content to be blank.
Diffstat (limited to 'api')
-rw-r--r--api/migrations/0028_allow_message_content_blank.py18
-rw-r--r--api/models.py3
2 files changed, 20 insertions, 1 deletions
diff --git a/api/migrations/0028_allow_message_content_blank.py b/api/migrations/0028_allow_message_content_blank.py
new file mode 100644
index 00000000..6d57db27
--- /dev/null
+++ b/api/migrations/0028_allow_message_content_blank.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.1.5 on 2019-01-20 09:41
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('api', '0027_merge_20190120_0852'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='deletedmessage',
+ name='content',
+ field=models.CharField(blank=True, help_text='The content of this message, taken from Discord.', max_length=2000),
+ ),
+ ]
diff --git a/api/models.py b/api/models.py
index b063b78c..4f6d00ae 100644
--- a/api/models.py
+++ b/api/models.py
@@ -268,7 +268,8 @@ class Message(ModelReprMixin, models.Model):
)
content = models.CharField(
max_length=2_000,
- help_text="The content of this message, taken from Discord."
+ help_text="The content of this message, taken from Discord.",
+ blank=True
)
embeds = pgfields.ArrayField(
pgfields.JSONField(