~edwargix/git.sr.ht

e756151502e3440e7e583b546635de507a51cf1e — Drew DeVault 7 years ago 6e2a169
Why were there wildcards in that query?
1 files changed, 1 insertions(+), 1 deletions(-)

M gitsrht/repos.py
M gitsrht/repos.py => gitsrht/repos.py +1 -1
@@ 16,7 16,7 @@ def validate_name(valid, owner, repo_name):
            "Name must match [a-z._-][a-z0-9._-]*", field="name")
    existing = (Repository.query
            .filter(Repository.owner_id == owner.id)
            .filter(Repository.name.ilike("%" + repo_name + "%"))
            .filter(Repository.name.ilike(repo_name))
            .first())
    if existing and existing.visibility == RepoVisibility.autocreated:
        return existing