forked from mirrors/bookwyrm
move from reading to editable shelf with logic that actually works
This commit is contained in:
parent
c6a2de3bbc
commit
41862e854c
1 changed files with 5 additions and 1 deletions
|
@ -96,7 +96,11 @@ class ReadingStatus(View):
|
|||
if bool(request.POST.get("shelf")):
|
||||
# unshelve the existing shelf
|
||||
this_shelf = request.POST.get("shelf")
|
||||
if int(this_shelf) not in [1,2,3]:
|
||||
if (
|
||||
bool(current_status_shelfbook) and
|
||||
int(this_shelf) != int(current_status_shelfbook.shelf.id) and
|
||||
current_status_shelfbook.shelf.identifier != desired_shelf.identifier
|
||||
):
|
||||
return unshelve(request, referer=referer, book_id=book_id)
|
||||
# don't try to unshelve a read status shelf: it has already been deleted.
|
||||
return HttpResponse(headers={"forceReload" : "true"})
|
||||
|
|
Loading…
Reference in a new issue