Skip to content

Commit

Permalink
Fix cardinality violation error: subquery must return at most 1 result
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Dec 21, 2023
1 parent 0887ec9 commit 92e946b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8293,6 +8293,7 @@ def cancel_invocation_steps(self):
.filter(WorkflowInvocationStep.workflow_invocation_id == self.id)
.filter(~Job.state.in_(Job.finished_states))
.with_for_update()
.limit(1)
.scalar_subquery()
)
sa_session.execute(update(Job.table).where(Job.id == job_subq).values({"state": Job.states.DELETING}))
Expand Down

0 comments on commit 92e946b

Please sign in to comment.