From 965d84f86f4e9bef3eabeac6512058183229c462 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 11 Mar 2021 15:41:12 -0800 Subject: [PATCH] Fixes creating news works --- bookwyrm/templates/edit_book.html | 2 +- bookwyrm/views/books.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/edit_book.html b/bookwyrm/templates/edit_book.html index 700dc5704..e42f77f2d 100644 --- a/bookwyrm/templates/edit_book.html +++ b/bookwyrm/templates/edit_book.html @@ -60,7 +60,7 @@ {% for match in book_matches %} {% endfor %} - + {% endif %} diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py index ae60c677d..9048f43dd 100644 --- a/bookwyrm/views/books.py +++ b/bookwyrm/views/books.py @@ -203,7 +203,7 @@ class ConfirmEditBook(View): # create work, if needed if not book_id: work_match = request.POST.get("parent_work") - if work_match: + if work_match and work_match != "0": work = get_object_or_404(models.Work, id=work_match) else: work = models.Work.objects.create(title=form.cleaned_data["title"])