Fixed BUG-18 -> cannot find book
This commit is contained in:
3
BUGs
3
BUGs
@@ -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...
|
||||
|
||||
5
main.py
5
main.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user