Standardize JS, use button, & filter empty authors
This commit is contained in:
@ -43,8 +43,8 @@ class EditBook(View):
|
||||
if not form.is_valid():
|
||||
return TemplateResponse(request, "book/edit/edit_book.html", data)
|
||||
|
||||
add_author = request.POST.getlist("add_author")
|
||||
# we're adding an author through a free text field
|
||||
# filter out empty author fields
|
||||
add_author = [author for author in request.POST.getlist("add_author") if author]
|
||||
if add_author:
|
||||
data["add_author"] = add_author
|
||||
data["author_matches"] = []
|
||||
|
Reference in New Issue
Block a user