forked from mirrors/bookwyrm
Fixes model name
This commit is contained in:
parent
497b54c014
commit
66f8e9b4fc
1 changed files with 2 additions and 2 deletions
|
@ -5,9 +5,9 @@ import django.db.models.expressions
|
||||||
|
|
||||||
|
|
||||||
def normalize_readthrough_dates(app_registry, schema_editor):
|
def normalize_readthrough_dates(app_registry, schema_editor):
|
||||||
"""bih"""
|
"""Find any invalid dates and reset them"""
|
||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
app_registry.get_model("bookwyrm", "Readthrough").objects.using(db_alias).filter(
|
app_registry.get_model("bookwyrm", "ReadThrough").objects.using(db_alias).filter(
|
||||||
start_date__gt=models.F("finish_date")
|
start_date__gt=models.F("finish_date")
|
||||||
).update(start_date=models.F("finish_date"))
|
).update(start_date=models.F("finish_date"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue