diff options
author | BonfaceKilz | 2021-10-06 16:19:04 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-10-06 16:20:47 +0300 |
commit | 870edaf2cf8ce8588ee7c58d08fc1f307f7198ec (patch) | |
tree | 8fc15604e09f879ace80c352cf6ce39204aa0124 /scripts/authentication | |
parent | 931c7eb07cc995118ba808df760fd74de036853f (diff) | |
download | genenetwork2-870edaf2cf8ce8588ee7c58d08fc1f307f7198ec.tar.gz |
scripts: group: Remove empty `""` value for data.get
data.get("field") will default to None if there is no value; and None
is falsy.
Diffstat (limited to 'scripts/authentication')
-rw-r--r-- | scripts/authentication/group.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/authentication/group.py b/scripts/authentication/group.py index d3f9a1e4..1919d9db 100644 --- a/scripts/authentication/group.py +++ b/scripts/authentication/group.py @@ -131,10 +131,10 @@ if __name__ == "__main__": members=members, admins=admins) - if not REDIS_CONN.hget("groups", data.get("field", "")): updated_data = json.loads(data["value"]) updated_data["created_timestamp"] = datetime.datetime.utcnow().strftime('%b %d %Y %I:%M%p') data["value"] = json.dumps(updated_data) + if not REDIS_CONN.hget("groups", data.get("field")): created_p = REDIS_CONN.hset(data.get("key", ""), data.get("field", ""), |