Fixes add/edit notes form on list page

This commit is contained in:
Mouse Reeve 2022-02-03 10:30:30 -08:00
parent baf28c523a
commit a46ab96d9b
2 changed files with 4 additions and 2 deletions

View file

@ -97,7 +97,7 @@
<span class="details-close icon icon-pencil" aria-hidden></span>
</span>
</summary>
{% include "lists/edit_item_form.html" %}
{% include "lists/edit_item_form.html" with book=item.book %}
</details>
</div>
{% endif %}
@ -112,7 +112,7 @@
<span class="details-close icon icon-plus" aria-hidden></span>
</span>
</summary>
{% include "lists/edit_item_form.html" %}
{% include "lists/edit_item_form.html" with book=item.book %}
</details>
</div>
{% endif %}

View file

@ -19,4 +19,6 @@ class ListItem(View):
form = forms.ListItemForm(request.POST, instance=list_item)
if form.is_valid():
form.save()
else:
raise Exception(form.errors)
return redirect("list", list_item.book_list.id)