Use supplier_uuid instead of team_uuid in findSupplierProductHubs
All checks were successful
Build Docker Image / build (push) Successful in 1m27s
All checks were successful
Build Docker Image / build (push) Successful in 1m27s
This commit is contained in:
@@ -900,17 +900,17 @@ class Query(graphene.ObjectType):
|
|||||||
db = get_db()
|
db = get_db()
|
||||||
ensure_graph()
|
ensure_graph()
|
||||||
|
|
||||||
# Find offer nodes with this team_uuid AND product_uuid
|
# Find offer nodes with this supplier_uuid AND product_uuid
|
||||||
aql_offers = """
|
aql_offers = """
|
||||||
FOR node IN nodes
|
FOR node IN nodes
|
||||||
FILTER node.product_uuid == @product_uuid
|
FILTER node.product_uuid == @product_uuid
|
||||||
FILTER node.team_uuid == @team_uuid
|
FILTER node.supplier_uuid == @supplier_uuid
|
||||||
RETURN node._key
|
RETURN node._key
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
cursor = db.aql.execute(
|
cursor = db.aql.execute(
|
||||||
aql_offers,
|
aql_offers,
|
||||||
bind_vars={'product_uuid': product_uuid, 'team_uuid': supplier_uuid}
|
bind_vars={'product_uuid': product_uuid, 'supplier_uuid': supplier_uuid}
|
||||||
)
|
)
|
||||||
offer_keys = list(cursor)
|
offer_keys = list(cursor)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -918,7 +918,7 @@ class Query(graphene.ObjectType):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
if not offer_keys:
|
if not offer_keys:
|
||||||
logger.info("No offers found for team %s, product %s", supplier_uuid, product_uuid)
|
logger.info("No offers found for supplier %s, product %s", supplier_uuid, product_uuid)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# Find hubs reachable from these offer nodes
|
# Find hubs reachable from these offer nodes
|
||||||
|
|||||||
Reference in New Issue
Block a user