diff --git a/lib/galaxy/jobs/handler.py b/lib/galaxy/jobs/handler.py index 3d7d1869b1ab..d7720bcaf00d 100644 --- a/lib/galaxy/jobs/handler.py +++ b/lib/galaxy/jobs/handler.py @@ -212,7 +212,7 @@ def __monitor_step( self ): .join(model.LibraryDatasetDatasetAssociation) \ .join(model.Dataset) \ .filter(and_((model.Job.state == model.Job.states.NEW), - or_((model.LibraryDatasetDatasetAssociation._state is not None), + or_((model.LibraryDatasetDatasetAssociation._state != null()), (model.LibraryDatasetDatasetAssociation.deleted == true()), (model.Dataset.state != model.Dataset.states.OK), (model.Dataset.deleted == true())))).subquery()