Working resolver integration with buildSelect3 exception
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user