From a05ef1a22211e3fc88d3d3a61f1773d23fefa234 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 22 Sep 2021 11:23:56 -0700 Subject: [PATCH] Adds active field to readthrough model --- .../migrations/0099_readthrough_is_active.py | 18 ++++++++++++++++++ bookwyrm/models/readthrough.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 bookwyrm/migrations/0099_readthrough_is_active.py diff --git a/bookwyrm/migrations/0099_readthrough_is_active.py b/bookwyrm/migrations/0099_readthrough_is_active.py new file mode 100644 index 000000000..a7a2d05fd --- /dev/null +++ b/bookwyrm/migrations/0099_readthrough_is_active.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.4 on 2021-09-22 16:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("bookwyrm", "0098_auto_20210918_2238"), + ] + + operations = [ + migrations.AddField( + model_name="readthrough", + name="is_active", + field=models.BooleanField(default=False), + ), + ] diff --git a/bookwyrm/models/readthrough.py b/bookwyrm/models/readthrough.py index 343d3c115..7051deb76 100644 --- a/bookwyrm/models/readthrough.py +++ b/bookwyrm/models/readthrough.py @@ -27,6 +27,7 @@ class ReadThrough(BookWyrmModel): ) start_date = models.DateTimeField(blank=True, null=True) finish_date = models.DateTimeField(blank=True, null=True) + is_active = models.BooleanField(default=False) def save(self, *args, **kwargs): """update user active time"""