mirror of https://git.sr.ht/~sircmpwn/hub.sr.ht
Make project tags optional
Didn't notice this in the original patchset
This commit is contained in:
parent
5b3555567f
commit
8737b4881d
|
@ -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),
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue