diff options
author | zsloan | 2022-12-15 20:53:40 +0000 |
---|---|---|
committer | zsloan | 2022-12-15 20:53:40 +0000 |
commit | 1d5ae191b5da9cd0bc9f800d0a4cf4f65518a5e2 (patch) | |
tree | 2cf24db3bd32a4e0c88cd7ee66176df511f99211 | |
parent | 7954a5fbe35e4690beb12d2096199d31d08ee01d (diff) | |
download | genenetwork2-1d5ae191b5da9cd0bc9f800d0a4cf4f65518a5e2.tar.gz |
Fix bug where changing a resource owner throws an error due to users without email_addresses (can happen for orcid/github users currently)
-rw-r--r-- | wqflask/wqflask/resource_manager.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/resource_manager.py b/wqflask/wqflask/resource_manager.py index c0717314..91731a4a 100644 --- a/wqflask/wqflask/resource_manager.py +++ b/wqflask/wqflask/resource_manager.py @@ -163,7 +163,7 @@ def search_user(resource_id: str): user = json.loads(users[user]) for q in (request.form.get("user_name"), request.form.get("user_email")): - if q and (q in user.get("email_address") or - q in user.get("full_name")): + if q and (q in user.get("email_address", "") or + q in user.get("full_name", "")): results[user.get("user_id", "")] = user return json.dumps(tuple(results.values())) |