summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/posts/migrations/0017_auto_20201223_1447.py25
-rw-r--r--app/posts/models.py2
2 files changed, 26 insertions, 1 deletions
diff --git a/app/posts/migrations/0017_auto_20201223_1447.py b/app/posts/migrations/0017_auto_20201223_1447.py
new file mode 100644
index 0000000..6c6a1c0
--- /dev/null
+++ b/app/posts/migrations/0017_auto_20201223_1447.py
@@ -0,0 +1,25 @@
+# Generated by Django 3.1 on 2020-12-23 14:47
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('media', '0008_auto_20201202_1155'),
+ ('posts', '0016_post_site'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='post',
+ name='featured_image',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='media.luximage'),
+ ),
+ migrations.AlterField(
+ model_name='post',
+ name='post_type',
+ field=models.IntegerField(choices=[(0, 'field test'), (1, 'review'), (2, 'essay'), (3, 'src'), (4, 'jrnl'), (5, 'field note'), (6, 'guide')], default=4),
+ ),
+ ]
diff --git a/app/posts/models.py b/app/posts/models.py
index 857b619..74376db 100644
--- a/app/posts/models.py
+++ b/app/posts/models.py
@@ -70,7 +70,7 @@ class Post(models.Model):
(1, 'Published'),
)
status = models.IntegerField(choices=PUB_STATUS, default=0)
- featured_image = models.ForeignKey(LuxImage, on_delete=models.CASCADE, null=True, blank=True)
+ featured_image = models.ForeignKey(LuxImage, on_delete=models.SET_NULL, null=True, blank=True)
TEMPLATES = (
(0, 'single'),
(1, 'double'),