File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -533,6 +533,7 @@ class GetAllRunsUseCase {
533533 association : 'qcFlags' ,
534534 required : false ,
535535 separate : true ,
536+ order : [ [ 'id' , 'ASC' ] ] ,
536537 where : { [ Op . and ] : [
537538 { deleted : false } ,
538539 sequelize . literal ( `(
@@ -557,13 +558,7 @@ class GetAllRunsUseCase {
557558 } else {
558559 qcFlagsAssociationDef . include . push ( { association : 'dataPasses' , required : false } ) ;
559560 qcFlagsAssociationDef . include . push ( { association : 'simulationPasses' , required : false } ) ;
560- qcFlagsAssociationDef . where [ Op . or ] = [
561- { '$qcFlags.id$' : null } ,
562- {
563- '$qcFlags.dataPasses.id$' : null ,
564- '$qcFlags.simulationPasses.id$' : null ,
565- } ,
566- ] ;
561+ qcFlagsAssociationDef . where [ Op . and ] . push ( sequelize . literal ( '(`dataPasses`.`id` IS NULL AND `simulationPasses`.`id` IS NULL)' ) ) ;
567562
568563 fetchQueryBuilder . include ( qcFlagsAssociationDef ) ;
569564 }
You can’t perform that action at this time.
0 commit comments