fix 500 mark dropped w date
This commit is contained in:
parent
d1ddd65df6
commit
bfbc422e80
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue