bshepp commited on
Commit
7cdc1a2
·
1 Parent(s): c800712

fix: replace 'yield from' with for-loop in async generator (SyntaxError crash)

Browse files
src/backend/app/agent/orchestrator.py CHANGED
@@ -142,7 +142,8 @@ class Orchestrator:
142
 
143
  if step.status == AgentStepStatus.FAILED:
144
  # Can't continue without patient profile — skip remaining steps
145
- yield from self._skip_remaining_steps("parse")
 
146
  self._state.completed_at = datetime.utcnow()
147
  return
148
 
@@ -151,7 +152,8 @@ class Orchestrator:
151
  yield step
152
 
153
  if step.status == AgentStepStatus.FAILED:
154
- yield from self._skip_remaining_steps("reason")
 
155
  self._state.completed_at = datetime.utcnow()
156
  return
157
 
 
142
 
143
  if step.status == AgentStepStatus.FAILED:
144
  # Can't continue without patient profile — skip remaining steps
145
+ for skipped in self._skip_remaining_steps("parse"):
146
+ yield skipped
147
  self._state.completed_at = datetime.utcnow()
148
  return
149
 
 
152
  yield step
153
 
154
  if step.status == AgentStepStatus.FAILED:
155
+ for skipped in self._skip_remaining_steps("reason"):
156
+ yield skipped
157
  self._state.completed_at = datetime.utcnow()
158
  return
159