aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-17 22:29:02 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-17 22:29:02 +0100
commite2a9ea91cfae79dded1f223bd288af40bd657863 (patch)
tree8f1bb24411492c006f3047c26f81daf7190af1b1
parent2a7318eca205f40c35c51d3bf7c89dc9f2b635f8 (diff)
downloadcheatdb-e2a9ea91cfae79dded1f223bd288af40bd657863.tar.xz
Fix descriptions being required in warning and tag editors
-rw-r--r--app/blueprints/admin/tagseditor.py2
-rw-r--r--app/blueprints/admin/warningseditor.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/blueprints/admin/tagseditor.py b/app/blueprints/admin/tagseditor.py
index 3d351ee..d9cc913 100644
--- a/app/blueprints/admin/tagseditor.py
+++ b/app/blueprints/admin/tagseditor.py
@@ -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")
diff --git a/app/blueprints/admin/warningseditor.py b/app/blueprints/admin/warningseditor.py
index 418d052..f4c2fa4 100644
--- a/app/blueprints/admin/warningseditor.py
+++ b/app/blueprints/admin/warningseditor.py
@@ -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"])