fix 500 mark dropped w date

This commit is contained in:
Your Name 2024-01-21 20:46:27 -05:00 committed by Henri Dickson
parent d1ddd65df6
commit bfbc422e80

View file

@ -79,10 +79,12 @@ def mark(request: AuthedHttpRequest, item_uuid):
shelf_time_offset = {
ShelfType.WISHLIST: " 20:00:00",
ShelfType.PROGRESS: " 21:00:00",
ShelfType.DROPPED: " 21:30:00",
ShelfType.COMPLETE: " 22:00:00",
}
dt = parse_datetime(
request.POST.get("mark_date", "") + shelf_time_offset[status]
request.POST.get("mark_date", "")
+ shelf_time_offset.get(status, "")
)
mark_date = (
dt.replace(tzinfo=timezone.get_current_timezone()) if dt else None