Fixes model name

This commit is contained in:
Mouse Reeve 2021-08-29 11:12:57 -07:00
parent 497b54c014
commit 66f8e9b4fc

View file

@ -5,9 +5,9 @@ import django.db.models.expressions
def normalize_readthrough_dates(app_registry, schema_editor):
"""bih"""
"""Find any invalid dates and reset them"""
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")
).update(start_date=models.F("finish_date"))