~comcloudway/builds.sr.ht

36518bc0298d0c91669d9ab3a751705093af1f37 — Drew DeVault 2 years ago 570f719
Legacy API: fix exception when tags is not an array
1 files changed, 1 insertions(+), 1 deletions(-)

M buildsrht/blueprints/api.py
M buildsrht/blueprints/api.py => buildsrht/blueprints/api.py +1 -1
@@ 44,7 44,7 @@ def jobs_POST():
    write = valid.optional("access:write", [current_token.user.username], list)
    secrets = valid.optional("secrets", cls=bool, default=True)
    tags = valid.optional("tags", [], list)
    valid.expect(all(re.match(r"^[A-Za-z0-9_.-]+$", tag) for tag in tags),
    valid.expect(not valid.ok or all(re.match(r"^[A-Za-z0-9_.-]+$", tag) for tag in tags),
        "Invalid tag name, tags must use lowercase alphanumeric characters, underscores, dashes, or dots",
        field="tags")
    triggers = valid.optional("triggers", list(), list)