Fix findSupplierProductHubs: use team_uuid instead of supplier_uuid
All checks were successful
Build Docker Image / build (push) Successful in 1m39s

This commit is contained in:
Ruslan Bakiev
2026-01-16 10:35:17 +07:00
parent 8f1e3be129
commit 6084333704

View File

@@ -900,17 +900,17 @@ class Query(graphene.ObjectType):
db = get_db() db = get_db()
ensure_graph() ensure_graph()
# Find offer nodes with this supplier_uuid AND product_uuid # Find offer nodes with this team_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.supplier_uuid == @supplier_uuid FILTER node.team_uuid == @team_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, 'supplier_uuid': supplier_uuid} bind_vars={'product_uuid': product_uuid, 'team_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 supplier %s, product %s", supplier_uuid, product_uuid) logger.info("No offers found for team %s, product %s", supplier_uuid, product_uuid)
return [] return []
# Find hubs reachable from these offer nodes # Find hubs reachable from these offer nodes