Formatting

This commit is contained in:
Mouse Reeve 2021-03-15 15:33:05 -07:00
parent f0a936f15e
commit b1335d2811
2 changed files with 2 additions and 4 deletions

View file

@ -117,9 +117,7 @@ urlpatterns = [
# lists
re_path(r"^list/?$", views.Lists.as_view(), name="lists"),
re_path(r"^list/(?P<list_id>\d+)(.json)?/?$", views.List.as_view(), name="list"),
re_path(
r"^list/add-book/?$", views.list.add_book, name="list-add-book"
),
re_path(r"^list/add-book/?$", views.list.add_book, name="list-add-book"),
re_path(
r"^list/(?P<list_id>\d+)/remove/?$",
views.list.remove_book,

View file

@ -175,7 +175,7 @@ class Curate(View):
@require_POST
def add_book(request):
""" put a book on a list """
book_list = get_object_or_404(models.List, id=request.POST.get('list'))
book_list = get_object_or_404(models.List, id=request.POST.get("list"))
if not object_visible_to_user(request.user, book_list):
return HttpResponseNotFound()