fix(crud): set end_date for books too when progress hits total

Previously only series received an end_date when progress reached
max. Books now behave consistently.
This commit is contained in:
ki
2026-07-21 23:17:50 +02:00
parent a73e28e51a
commit 56a8d5d302
+1 -1
View File
@@ -153,7 +153,7 @@ def bump_progress(db: Session, media: models.Media, payload: schemas.ProgressUpd
media.status = "plan"
elif total and new_value >= total:
media.status = "done"
if media.kind == "series" and not media.end_date:
if not media.end_date:
from datetime import date
media.end_date = date.today()
elif media.status == "plan":