forked from mirrors/bookwyrm
Fixes bug in removing list item
This commit is contained in:
parent
19b56c26f7
commit
b9b5694165
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ def remove_book(request, list_id):
|
||||||
book_list = get_object_or_404(models.List, id=list_id)
|
book_list = get_object_or_404(models.List, id=list_id)
|
||||||
item = get_object_or_404(models.ListItem, id=request.POST.get('item'))
|
item = get_object_or_404(models.ListItem, id=request.POST.get('item'))
|
||||||
|
|
||||||
if not book_list.user == request.user and not item.user == request.user:
|
if not book_list.user == request.user and not item.added_by == request.user:
|
||||||
return HttpResponseNotFound()
|
return HttpResponseNotFound()
|
||||||
|
|
||||||
item.delete()
|
item.delete()
|
||||||
|
|
Loading…
Reference in a new issue