Fixed BUG-18 -> cannot find book

This commit is contained in:
2021-01-10 00:21:50 +11:00
parent 150b808bb5
commit 35d92e0ab6
2 changed files with 8 additions and 4 deletions

3
BUGs
View File

@@ -1,5 +1,4 @@
#### BUGS (next-18)
BUG-18: delete a book, then go to that URL and you get odd DB errors, rather than book not found
#### BUGS (next-19)
### DB/back-end
BUG-2: series does not deal with calcd_rating...

View File

@@ -593,6 +593,11 @@ def book(id):
st.SetMessage(message)
else:
book = Book.query.get(id)
if book == None:
st.SetAlert("danger")
st.SetMessage("Cannot find Book (id={})".format(id))
return render_template("base.html", alert=st.GetAlert(), message=st.GetMessage())
book_form=BookForm(obj=book)
author_list = GetAuthors()