From f7bb29c839b2a03902fe2707eb67534c1947dcd3 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Mon, 28 May 2018 14:54:17 +0100 Subject: [PATCH] Fix empty release titles being allowed Fixes #86 --- app/views/packages/releases.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/packages/releases.py b/app/views/packages/releases.py index 96a75075..6d8691bb 100644 --- a/app/views/packages/releases.py +++ b/app/views/packages/releases.py @@ -30,16 +30,14 @@ from wtforms import * from wtforms.validators import * class CreatePackageReleaseForm(FlaskForm): - name = StringField("Name") - title = StringField("Title") + title = StringField("Title", [InputRequired(), Length(1, 30)]) uploadOpt = RadioField ("Method", choices=[("upload", "File Upload")], default="upload") vcsLabel = StringField("VCS Commit or Branch", default="master") fileUpload = FileField("File Upload") submit = SubmitField("Save") class EditPackageReleaseForm(FlaskForm): - name = StringField("Name") - title = StringField("Title") + title = StringField("Title", [InputRequired(), Length(1, 30)]) url = StringField("URL", [URL]) task_id = StringField("Task ID") approved = BooleanField("Is Approved")