diff --git a/module/pivot/model.php b/module/pivot/model.php index 8bc32d1308..be1f59bff7 100644 --- a/module/pivot/model.php +++ b/module/pivot/model.php @@ -36,7 +36,10 @@ class pivotModel extends model */ public function getByID(int $pivotID, bool $processDateVar = false): object|bool { - $pivot = $this->dao->select('*')->from(TABLE_PIVOT)->where('id')->eq($pivotID)->fetch(); + $pivot = $this->dao->select('*')->from(TABLE_PIVOT) + ->where('id')->eq($pivotID) + ->andWhere('deleted')->eq('0') + ->fetch(); if(!$pivot) return false; $pivot->fieldSettings = array(); diff --git a/module/pivot/tao.php b/module/pivot/tao.php index 94021fa6fd..db76812102 100644 --- a/module/pivot/tao.php +++ b/module/pivot/tao.php @@ -402,6 +402,7 @@ EOT)->from(TABLE_TASK)->alias('t1') return (int)$this->dao->select('id')->from(TABLE_PIVOT) ->where("FIND_IN_SET({$groupID}, `group`)") ->andWhere('stage')->ne('draft') + ->andWhere('deleted')->eq('0') ->orderBy('id_desc') ->limit(1) ->fetch('id');