diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 6c79d51fccb6..136aff1b646e 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -8293,9 +8293,8 @@ def cancel_invocation_steps(self): .filter(WorkflowInvocationStep.workflow_invocation_id == self.id) .filter(~Job.state.in_(Job.finished_states)) .with_for_update() - .scalar_subquery() ) - sa_session.execute(update(Job.table).where(Job.id == job_subq).values({"state": Job.states.DELETING})) + sa_session.execute(update(Job.table).where(Job.id.in_(job_subq)).values({"state": Job.states.DELETING})) job_collection_subq = ( select(Job.id)