Skip to content

Commit

Permalink
reverting order of sub-task results
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Feb 13, 2021
1 parent 8f55fb2 commit 1370944
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions biosimulators_utils/sedml/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def exec_task(task, variables, log=None):
sub_tasks = sorted(task.sub_tasks, key=lambda sub_task: sub_task.order)

# execute the sub-tasks and record their results
for sub_task in sub_tasks:
for i_sub_task, sub_task in enumerate(sub_tasks):
if isinstance(sub_task.task, Task):
if apply_xml_model_changes:
model = sub_task.task.model
Expand Down Expand Up @@ -507,7 +507,6 @@ def exec_task(task, variables, log=None):
raise NotImplementedError('Tasks of type {} are not supported.'.format(sub_task.task.__class__.__name__))

for var in task_vars:
i_sub_task = task.sub_tasks.index(sub_task)
variable_results[var.id][i_main_range][i_sub_task] = sub_task_var_results.get(var.id, None)

# shape results to consistent size
Expand Down

0 comments on commit 1370944

Please sign in to comment.