From 1cc0c14f8627812701b06a8935f6154c4a38c364 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 20 Oct 2020 18:50:39 -0700 Subject: [PATCH] Deleted date should be null-able Fixes #240 --- bookwyrm/migrations/0056_auto_20201021_0150.py | 18 ++++++++++++++++++ bookwyrm/models/status.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 bookwyrm/migrations/0056_auto_20201021_0150.py diff --git a/bookwyrm/migrations/0056_auto_20201021_0150.py b/bookwyrm/migrations/0056_auto_20201021_0150.py new file mode 100644 index 000000000..1408efb98 --- /dev/null +++ b/bookwyrm/migrations/0056_auto_20201021_0150.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2020-10-21 01:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bookwyrm', '0055_merge_20201017_0011'), + ] + + operations = [ + migrations.AlterField( + model_name='status', + name='deleted_date', + field=models.DateTimeField(blank=True, null=True), + ), + ] diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py index 0a70eb77c..61e9c5005 100644 --- a/bookwyrm/models/status.py +++ b/bookwyrm/models/status.py @@ -23,7 +23,7 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel): # the created date can't be this, because of receiving federated posts published_date = models.DateTimeField(default=timezone.now) deleted = models.BooleanField(default=False) - deleted_date = models.DateTimeField() + deleted_date = models.DateTimeField(blank=True, null=True) favorites = models.ManyToManyField( 'User', symmetrical=False,