mirror of
https://github.com/adulau/hashlookup-server.git
synced 2024-11-24 02:57:08 +00:00
fix: [api/md5] if there is already more data in default SHA1 we use that one and not the fall-back MD5 lookup
This commit is contained in:
parent
fe04f1e7dd
commit
74c0e8c8c2
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ class lookup(Resource):
|
||||||
session_key = "session:{}:exist".format(request.headers.get('hashlookup_session'))
|
session_key = "session:{}:exist".format(request.headers.get('hashlookup_session'))
|
||||||
rdb.sadd(session_key, k)
|
rdb.sadd(session_key, k)
|
||||||
rdb.expire(session_key, ttl)
|
rdb.expire(session_key, ttl)
|
||||||
if rdb.exists("h:{}".format(k)):
|
if rdb.exists("h:{}".format(k)) and not rdb.exists("l:{}".format(k)):
|
||||||
h = rdb.hgetall("h:{}".format(k))
|
h = rdb.hgetall("h:{}".format(k))
|
||||||
sha1 = k
|
sha1 = k
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue