From fc5e422dc9044d07a13252f23916313cae21a268 Mon Sep 17 00:00:00 2001 From: Ross Mountjoy Date: Sat, 8 Feb 2020 17:31:53 -0500 Subject: [PATCH] fixed critical bug --- dashmachine/settings_system/routes.py | 1 + dashmachine/user_system/forms.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dashmachine/settings_system/routes.py b/dashmachine/settings_system/routes.py index 277f25d..b36b056 100644 --- a/dashmachine/settings_system/routes.py +++ b/dashmachine/settings_system/routes.py @@ -31,6 +31,7 @@ def settings(): config_form = ConfigForm() user_form = UserForm() + user_form.role.choices += [(role, role) for role in settings_db.roles.split(",")] with open(os.path.join(user_data_folder, "config.ini"), "r") as config_file: config_form.config.data = config_file.read() files_html = load_files_html() diff --git a/dashmachine/user_system/forms.py b/dashmachine/user_system/forms.py index e36ca0b..adbfd23 100644 --- a/dashmachine/user_system/forms.py +++ b/dashmachine/user_system/forms.py @@ -11,7 +11,7 @@ class UserForm(FlaskForm): password = PasswordField(validators=[DataRequired(), Length(min=8, max=120)]) - role = SelectField(choices=[(role, role) for role in settings_db.roles.split(",")]) + role = SelectField(choices=[]) id = StringField()