aboutsummaryrefslogtreecommitdiff
path: root/scripts/authentication/group.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-10-06 16:19:04 +0300
committerBonfaceKilz2021-10-06 16:20:47 +0300
commit870edaf2cf8ce8588ee7c58d08fc1f307f7198ec (patch)
tree8fc15604e09f879ace80c352cf6ce39204aa0124 /scripts/authentication/group.py
parent931c7eb07cc995118ba808df760fd74de036853f (diff)
downloadgenenetwork2-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/group.py')
-rw-r--r--scripts/authentication/group.py2
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", ""),