Skip to content

Commit

Permalink
Merge pull request #122 from xylar/fix-error-if-step-in-task
Browse files Browse the repository at this point in the history
Fix detecting step already added to task
  • Loading branch information
xylar authored Sep 25, 2023
2 parents e9ed211 + 900cd91 commit ec40f61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polaris/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def add_step(self, step=None, subdir=None, symlink=None,
f'component first, then to the task.')
step = component.steps[subdir]

if step.subdir in self.steps:
if step.name in self.steps:
raise ValueError(f'A step has already been added to this task '
f'with path {step.subdir}')
f'with name {step.name}')

# add the step to the component (if it's not already there)
component.add_step(step)
Expand Down

0 comments on commit ec40f61

Please sign in to comment.