Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Feb 19, 2024
1 parent ff33546 commit b4f3201
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions qiita_db/metadata_template/prep_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,15 +927,16 @@ def _get_predecessors(workflow, node):
# be a safe assumption
for pnode, cxn in zip(pnodes, cxns):
info = _get_node_info(wk, pnode)
if init_artifacts is None:
init_artifacts = dict()
for k, v in merging_schemes[info].items():
if k in cxn:
k = cxn[k]
init_artifacts[k] = v
if info in merging_schemes:
if init_artifacts is None:
init_artifacts = dict()
for k, v in merging_schemes[info].items():
if k in cxn:
k = cxn[k]
init_artifacts[k] = v

reqp = {x: y[1][0]
for x, y in cdp_cmd.required_parameters.items()}
rp = cdp_cmd.required_parameters
reqp = {x: y[1][0] for x, y in rp.items()}

cmds_to_create.append([cdp_cmd, params, reqp])

Expand Down Expand Up @@ -979,8 +980,10 @@ def _get_predecessors(workflow, node):
'this preparation; this might be due '
'to missing steps or not having the '
'correct raw data.')
# raises option c.
raise ValueError(msg)
init_artifacts[aname] = init_artifacts[aid]
if aname not in init_artifacts:
# raises option c.
raise ValueError(msg)
req_params[aname] = init_artifacts[aname]
else:
req_params = dict()
Expand Down

0 comments on commit b4f3201

Please sign in to comment.