Make project tags optional

Didn't notice this in the original patchset
This commit is contained in:
Drew DeVault 2020-09-12 09:57:41 -04:00
parent 5b3555567f
commit 8737b4881d
3 changed files with 3 additions and 5 deletions

View file

@ -147,7 +147,7 @@ def create_POST():
valid = Validation(request)
name = valid.require("name")
description = valid.require("description")
raw_tags = valid.require("tags")
raw_tags = valid.optional("tags")
visibility = valid.require("visibility", cls=Visibility)
valid.expect(not name or len(name) < 128,
"Name must be fewer than 128 characters", field="name")
@ -191,7 +191,7 @@ def config_POST(owner, project_name):
valid = Validation(request)
description = valid.require("description")
tags = _verify_tags(valid, valid.require("tags"))
tags = _verify_tags(valid, valid.optional("tags"))
website = valid.optional("website")
visibility = valid.require("visibility", cls=Visibility)
valid.expect(not website or valid_url(website),

View file

@ -41,8 +41,7 @@
id="tags"
name="tags"
placeholder="Up to three comma-separated topics"
value="{{tags or ", ".join(project.tags)}}"
required />
value="{{tags or ", ".join(project.tags)}}" />
{{valid.summary("tags")}}
</div>
<div class="form-group">

View file

@ -51,7 +51,6 @@
name="tags"
class="form-control {{valid.cls("tags")}}"
placeholder="Up to three comma-separated topics"
required
value="{{", ".join(tags) or ""}}" />
{{valid.summary("tags")}}
</div>