* [bug,0.5h] fix get pivot with deleted.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user