mirror of
https://github.com/adulau/hashlookup-server.git
synced 2024-12-09 18:37:23 +00:00
chg: [api] md5 lookup updated to allow MD5 only records
This commit is contained in:
parent
c17dbff6a6
commit
bb29fcb25c
1 changed files with 5 additions and 2 deletions
|
@ -100,8 +100,11 @@ class lookup(Resource):
|
|||
session_key = "session:{}:exist".format(request.headers.get('hashlookup_session'))
|
||||
rdb.sadd(session_key, k)
|
||||
rdb.expire(session_key, ttl)
|
||||
sha1 = rdb.get("l:{}".format(k))
|
||||
h = rdb.hgetall("h:{}".format(sha1))
|
||||
if rdb.exist("h:{}".format(k)):
|
||||
h = db.hgetall("h:{}".format(k))
|
||||
else:
|
||||
sha1 = rdb.get("l:{}".format(k))
|
||||
h = rdb.hgetall("h:{}".format(sha1))
|
||||
if "OpSystemCode" in h:
|
||||
if rdb.exists("h-OpSystemCode:{}".format(h['OpSystemCode'])):
|
||||
h['OpSystemCode'] = rdb.hgetall("h-OpSystemCode:{}".format(h['OpSystemCode']))
|
||||
|
|
Loading…
Reference in a new issue