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:
+1
-1
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user