Fix run recipe: optional fields in RunStatus, list->dict nodes
- Made recipe and inputs optional in RunStatus model - Convert DAG nodes from list format to dict format when running recipes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -220,6 +220,16 @@ async def run_recipe(
|
||||
dag_copy = json.loads(json.dumps(recipe_dag)) # Deep copy
|
||||
nodes = dag_copy.get("nodes", {})
|
||||
|
||||
# Convert nodes from list to dict if needed
|
||||
if isinstance(nodes, list):
|
||||
nodes_dict = {}
|
||||
for node in nodes:
|
||||
node_id = node.get("id")
|
||||
if node_id:
|
||||
nodes_dict[node_id] = node
|
||||
nodes = nodes_dict
|
||||
dag_copy["nodes"] = nodes
|
||||
|
||||
# Map input names to content hashes
|
||||
for input_name, content_hash in req.inputs.items():
|
||||
if input_name in nodes:
|
||||
|
||||
Reference in New Issue
Block a user