Adds active field to readthrough model

This commit is contained in:
Mouse Reeve 2021-09-22 11:23:56 -07:00
parent 5ad315faac
commit a05ef1a222
2 changed files with 19 additions and 0 deletions

View file

@ -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),
),
]

View file

@ -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"""