Working resolver integration with buildSelect3 exception

This commit is contained in:
Lyncoln
2026-10-13 15:03:24 -04:00
parent db26a74754
commit a7cd75cc25
22 changed files with 132 additions and 70 deletions
Binary file not shown.
Binary file not shown.
+28 -1
View File
@@ -2,8 +2,9 @@ def resolveItem(action, item):
resolved = {}
label = action.resolve["label"]
targetkeys = action.resolve["targetkeys"]
#print(item)
target = item
for key in targetkeys:
target = target[key]
@@ -20,3 +21,29 @@ def resolveItem(action, item):
#print(resolved[label])
return resolved
def resolveItem2(action, item, outputs):
#resolved = {}
label = action.resolve["label"]
targetkeys = action.resolve["targetkeys"]
#print(item)
target = item
for key in targetkeys:
target = target[key]
#resolved[label] = target
#for label, keys in action.resolve.items():
#target = item
#print(target)
#for key in keys:
#target = target[key]
#resolved[label] = target
#print(resolved[label])
outputs[label] = target
#print("Resolver DEBUG", target, outputs[label])
return outputs
+33
View File
@@ -66,8 +66,41 @@ def buildSelect2(action, outputs):
#select_data.append(item)
def buildSelect3(action, outputs):
#print(outputs)
try:
select_data = []
target = outputs[action.select["source"]]
includekey = action.select["include"]["key"]
includevalue = action.select["include"]["value"]
excludekey = action.select["exclude"]["key"]
excludevalue = action.select["exclude"]["value"]
for item in target:
include_match = True
exclude_match = True
if includekey:
include_match = item[includekey] == includevalue
if excludekey:
exclude_match = item[excludekey] != excludevalue
if include_match and exclude_match:
select_data.append(item)
outputs[action.select["source"]] = select_data
print(select_data)
return select_data, action, outputs
except (KeyError, TypeError):
return select_data, action, outputs
def buildSelect4(action, outputs):
#print(outputs)
select_data = []
target = outputs[action.select["source"]]
#selectmethod = action.select["selectmethod"]
includekey = action.select["include"]["key"]