Fix changing email not working due to validation issue

This commit is contained in:
rubenwardy 2018-05-28 15:25:45 +01:00
parent f7bb29c839
commit 048b604a75
No known key found for this signature in database
GPG Key ID: A1E29D52FF81513C

@ -31,9 +31,9 @@ from app.tasks.emails import sendVerifyEmail
# Define the User profile form # Define the User profile form
class UserProfileForm(FlaskForm): class UserProfileForm(FlaskForm):
display_name = StringField("Display name", [InputRequired(), Length(2, 20)]) display_name = StringField("Display name", [Optional(), Length(2, 20)])
email = StringField("Email") email = StringField("Email", [Optional(), Email()])
rank = SelectField("Rank", [InputRequired()], choices=UserRank.choices(), coerce=UserRank.coerce, default=UserRank.NEW_MEMBER) rank = SelectField("Rank", [Optional()], choices=UserRank.choices(), coerce=UserRank.coerce, default=UserRank.NEW_MEMBER)
submit = SubmitField("Save") submit = SubmitField("Save")
@app.route("/users/", methods=["GET"]) @app.route("/users/", methods=["GET"])