fix: [api/lookup/sha1] missing parents bug

This commit is contained in:
Alexandre Dulaunoy 2021-09-05 07:36:44 +02:00
parent c470201fd8
commit 6461b91d55
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -172,7 +172,7 @@ class lookup(Resource):
p = rdb.smembers("p:{}".format(k))
else:
p = []
p = rdb.srandmember("p:{}".format(sha1), number=10)
p = rdb.srandmember("p:{}".format(k), number=10)
for parent in p:
parent_details = rdb.hgetall("h:{}".format(parent))
parents.append(parent_details)