Skip to content

Commit a00998c

Browse files
committed
fix: avoid adding duplicate stages with the same name/key
1 parent feffdc4 commit a00998c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

ami/jobs/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ def add_stage(self, name: str, key: str | None = None) -> JobProgressStageDetail
131131
def get_stage(self, stage_key: str) -> JobProgressStageDetail:
132132
for stage in self.stages:
133133
if stage.key == stage_key:
134-
if stage.name == stage.key:
135-
raise ValueError(f"Job stage with key '{stage_key}' has no name")
136134
return stage
137135
raise ValueError(f"Job stage with key '{stage_key}' not found in progress")
138136

0 commit comments

Comments
 (0)