From 297e211d1c695f097067ed8744df5c890f98a0ea Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 1 Dec 2020 19:18:04 +0100 Subject: [PATCH] Fix attachment upload There was no default specified for the open_graph_image flag --- .../migrations/0007_auto_20201201_1917.py | 18 ++++++++++++++++++ attachments/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 attachments/migrations/0007_auto_20201201_1917.py diff --git a/attachments/migrations/0007_auto_20201201_1917.py b/attachments/migrations/0007_auto_20201201_1917.py new file mode 100644 index 0000000..454ed25 --- /dev/null +++ b/attachments/migrations/0007_auto_20201201_1917.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.3 on 2020-12-01 18:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("attachments", "0006_auto_20201128_2022"), + ] + + operations = [ + migrations.AlterField( + model_name="attachment", + name="open_graph_image", + field=models.BooleanField(blank=True, default=False), + ), + ] diff --git a/attachments/models.py b/attachments/models.py index 6a30dc1..10ec080 100644 --- a/attachments/models.py +++ b/attachments/models.py @@ -30,7 +30,7 @@ class Attachment(models.Model): description = models.CharField(max_length=500) original_file = AbsoluteUrlFileField() processed_file = AbsoluteUrlFileField(blank=True, null=True) - open_graph_image = models.BooleanField(blank=True) + open_graph_image = models.BooleanField(blank=True, default=False) objects = AttachmentManager()