Fixes bug in removing list item

This commit is contained in:
Mouse Reeve 2021-01-31 13:14:52 -08:00
parent 19b56c26f7
commit b9b5694165

View file

@ -169,7 +169,7 @@ def remove_book(request, 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'))
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()
item.delete()