From 82d65e7cbabb6de7896d222dd6052fd9b4db853d Mon Sep 17 00:00:00 2001 From: akumar Date: Sun, 21 Apr 2024 12:30:24 +0200 Subject: [PATCH] fix: AQL filter query --- filter_ownership.aql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/filter_ownership.aql b/filter_ownership.aql index 53ce8aa..cb48ebb 100644 --- a/filter_ownership.aql +++ b/filter_ownership.aql @@ -2,11 +2,11 @@ let meta = node.meta let owner = meta.owners let found = ( for o in owner - filter o.id == "urn:restorecommerce:acs:names:ownerIndicatoryEntity" && o.value == @entity - let nestedAttributes = o.attributes - for ownerInst in nestedAttributes - filter ownerInst.id == "urn:restorecommerce:acs:names:ownerInstance" && ownerInst.value in @instance - return true + for arg in @customArguments + filter o.id == "urn:restorecommerce:acs:names:ownerIndicatoryEntity" && o.value == arg.entity + let nestedAttributes = o.attributes + for ownerInst in nestedAttributes + filter ownerInst.id == "urn:restorecommerce:acs:names:ownerInstance" && ownerInst.value in arg.instance + return true ) filter true in found -