Bugfixes from testrun

This commit is contained in:
Ozzie Isaacs
2022-01-04 21:12:59 +01:00
parent bbadfa2251
commit 6d839d5cc7
3 changed files with 461 additions and 590 deletions
Regular → Executable
+10 -1
View File
@@ -357,7 +357,16 @@ def delete_book_from_table(book_id, book_format, jsonResponse):
else:
# book not found
log.error('Book with id "%s" could not be deleted: not found', book_id)
return render_delete_book_result(book_format, jsonResponse, warning, book_id)
return render_delete_book_result(book_format, jsonResponse, warning, book_id)
message = _("You are missing permissions to delete books")
if jsonResponse:
return json.dumps({"location": url_for("editbook.edit_book", book_id=book_id),
"type": "danger",
"format": "",
"message": message})
else:
flash(message, category="error")
return redirect(url_for('editbook.edit_book', book_id=book_id))
def render_edit_book(book_id):