Commit 12015614 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Don't throw an exception after deleting default tops

/close #86
parent e696b9cd
......@@ -342,7 +342,7 @@ def edit_default_top(protocoltype, defaulttop):
def delete_default_top(defaulttop):
db.session.delete(defaulttop)
db.session.commit()
return redirect(request.args.get("next") or url_for("show_type", protocoltype_id=protocoltype.id))
return redirect(request.args.get("next") or url_for("show_type", protocoltype_id=defaulttop.protocoltype.id))
@app.route("/type/tops/move/<int:defaulttop_id>/<diff>/")
@login_required
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment