Skip to content
Snippets Groups Projects
Commit bd71d4c5 authored by Jiří Setnička's avatar Jiří Setnička
Browse files

Oprava převodu zpět na Enum při přidávání rolí

Fixes #32.
parent 72b70504
No related branches found
No related tags found
No related merge requests found
...@@ -148,7 +148,7 @@ def org_orgs(): ...@@ -148,7 +148,7 @@ def org_orgs():
class FormAddRole(FlaskForm): class FormAddRole(FlaskForm):
role = wtforms.SelectField('Role', choices=[(name.name, role.name) for (name, role) in mo.rights.roles_by_type.items()]) role = wtforms.SelectField('Role', choices=db.RoleType.choices(), coerce=db.RoleType.coerce)
place_code = wtforms.StringField('Oblast') place_code = wtforms.StringField('Oblast')
year = wtforms.IntegerField('Ročník', validators=[validators.Optional()]) year = wtforms.IntegerField('Ročník', validators=[validators.Optional()])
category = wtforms.StringField("Kategorie", validators=[validators.Length(max=2)], filters=[lambda x: x or None]) category = wtforms.StringField("Kategorie", validators=[validators.Length(max=2)], filters=[lambda x: x or None])
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment