Added redirect after create shelf

This commit is contained in:
Ozzieisaacs
2020-04-02 20:19:05 +02:00
parent 3ba610eb64
commit 4550333f1e
3 changed files with 2 additions and 8 deletions
+1
View File
@@ -226,6 +226,7 @@ def create_shelf():
ub.session.add(shelf)
ub.session.commit()
flash(_(u"Shelf %(title)s created", title=to_save["title"]), category="success")
return redirect(url_for('shelf.show_shelf', shelf_id = shelf.id ))
except Exception:
flash(_(u"There was an error"), category="error")
return render_title_template('shelf_edit.html', shelf=shelf, title=_(u"create a shelf"), page="shelfcreate")