code cleanup
This commit is contained in:
parent
b406a03533
commit
a3270551f9
4 changed files with 6 additions and 2 deletions
|
@ -94,8 +94,8 @@ def shelve(request):
|
|||
@require_POST
|
||||
def unshelve(request, referer=None, book_id=False):
|
||||
"""remove a book from a user's shelf"""
|
||||
id = book_id if book_id else request.POST.get("book")
|
||||
book = get_object_or_404(models.Edition, id=id)
|
||||
identity = book_id if book_id else request.POST.get("book")
|
||||
book = get_object_or_404(models.Edition, id=identity)
|
||||
shelf_book = get_object_or_404(
|
||||
models.ShelfBook, book=book, shelf__id=request.POST["shelf"]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue