Fix descriptions being required in warning and tag editors

This commit is contained in:
rubenwardy 2020-07-17 22:29:02 +01:00
parent 2a7318eca2
commit e2a9ea91cf
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ def tag_list():
class TagForm(FlaskForm):
title = StringField("Title", [InputRequired(), Length(3,100)])
description = TextAreaField("Description", [InputRequired(), Length(0, 500)])
description = TextAreaField("Description", [Optional(), Length(0, 500)])
name = StringField("Name", [Optional(), Length(1, 20), Regexp("^[a-z0-9_]", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")])
submit = SubmitField("Save")

View File

@ -31,8 +31,8 @@ def warning_list():
class WarningForm(FlaskForm):
title = StringField("Title", [InputRequired(), Length(3,100)])
description = TextAreaField("Description", [Optional(), Length(0, 500)])
name = StringField("Name", [Optional(), Length(1, 20), Regexp("^[a-z0-9_]", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")])
description = TextAreaField("Description", [InputRequired(), Length(0, 500)])
submit = SubmitField("Save")
@bp.route("/admin/warnings/new/", methods=["GET", "POST"])