fix: [api] typo fixed

This commit is contained in:
Alexandre Dulaunoy 2021-08-22 23:37:05 +02:00
parent a17cd38595
commit 02a675d9ea
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -140,11 +140,10 @@ class lookup(Resource):
h['ProductCode'] = rdb.hgetall("h-ProductCode:{}".format(h['ProductCode']))
if rdb.exists("p:{}".format(k)):
parents = []
for parent in rdb.smembers("p:{}".format(sha1)):
for parent in rdb.smembers("p:{}".format(k)):
parent_details = rdb.hgetall("h:{}".format(parent))
parents.append(parent_details)
h['parents'] = parents
return h
@api.route('/info')