Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rebrowning committed Jan 23, 2024
1 parent 52b8245 commit f8d2021
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions orquesta/specs/native/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,18 +183,21 @@ def render(self, in_ctx):
if " in " not in items_spec.items
else items_spec.items[: items_spec.items.index(" in ")].replace(" ", "").split(",")
)

for idx, item in enumerate(items):
if item_keys and (isinstance(item, tuple) or isinstance(item, list)):
item = dict(zip(item_keys, list(item)))
elif item_keys and len(item_keys) == 1:
item = {item_keys[0]: item}

item_ctx_value = ctx_util.set_current_item(item_ctx_value, item)

action_spec = {
"action": expr_base.evaluate(self.action, item_ctx_value),
"input": expr_base.evaluate(getattr(self, "input", {}), item_ctx_value),
"item_id": idx,
}

action_specs.append(action_spec)

return self, action_specs
Expand Down

0 comments on commit f8d2021

Please sign in to comment.