diff --git a/lib/galaxy/managers/jobs.py b/lib/galaxy/managers/jobs.py index 85bf8d255511..c700d9378cf3 100644 --- a/lib/galaxy/managers/jobs.py +++ b/lib/galaxy/managers/jobs.py @@ -404,7 +404,7 @@ def replace_dataset_ids(path, key, value): else: return [] - stmt = stmt.where(*data_conditions).group_by(model.Job.id, *used_ids).order_by(model.Job.id.desc()) + stmt = stmt.where(*data_conditions).group_by(model.Job.id, *used_ids).order_by(model.Job.id.desc()) for job in self.sa_session.execute(stmt): # We found a job that is equal in terms of tool_id, user, state and input datasets,