redo Status SetMessage so it defaults to success and danger is a force in the setting of the message, to fix BUG-52 where a success message ended up with danger colour somehow -- might not perfectly fix it, but its neater and if it does not fix it, then its a timing issue I am not sure how to test/fix

This commit is contained in:
2021-09-16 21:18:09 +10:00
parent 67b1c0dd49
commit 85902bbc3c
7 changed files with 8 additions and 27 deletions

View File

@@ -97,8 +97,7 @@ def settings():
db.session.commit()
return redirect( '/settings' )
except SQLAlchemyError as e:
st.SetAlert( "danger" )
st.SetMessage( "<b>Failed to modify Setting:</b>&nbsp;{}".format(e.orig) )
st.SetMessage( f"<b>Failed to modify Setting:</b>&nbsp;{e.orig}", "danger" )
return render_template("settings.html", form=form, page_title=page_title, HELP=HELP)
else:
form = SettingsForm( obj=Settings.query.first() )