diff --git a/module/doc/model.php b/module/doc/model.php index ca6e1e8d9c..6d46b39d42 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1077,8 +1077,9 @@ class docModel extends model ->andWhere($type)->eq($objectID) ->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi() ->beginIF($type == 'project') - ->andWhere('execution')->gt(0) - ->andWhere('main')->eq(0) + ->andWhere('(execution')->eq(0) + ->orWhere('main')->eq(0) + ->markRight(1) ->fi() ->orderBy('`order`, id') ->fetchAll('id');