diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-07-08 23:00:45 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-07-08 23:00:45 +0100 |
commit | b2809ed12eb3d8d2aca73c1a9ea1505085c307e6 (patch) | |
tree | dbd6f23c26a048f28f1df4379b80d1be99137acc | |
parent | a72b9a174ab6b811a53b47811384c76da1c524be (diff) | |
download | cheatdb-b2809ed12eb3d8d2aca73c1a9ea1505085c307e6.tar.xz |
Fix maintainers field requiring lowercase names
-rw-r--r-- | app/blueprints/packages/packages.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/blueprints/packages/packages.py b/app/blueprints/packages/packages.py index 853153c..12242ab 100644 --- a/app/blueprints/packages/packages.py +++ b/app/blueprints/packages/packages.py @@ -403,7 +403,7 @@ def edit_maintainers(package): form.maintainers_str.data = ", ".join([ x.username for x in package.maintainers ]) if request.method == "POST" and form.validate(): - usernames = [x.strip() for x in form.maintainers_str.data.split(",")] + usernames = [x.strip().lower() for x in form.maintainers_str.data.split(",")] users = User.query.filter(func.lower(User.username).in_(usernames)).all() package.maintainers.clear() package.maintainers.extend(users) |