Merge branch 'sgm_fixbug' into 'master'

* Fix bug.

See merge request easycorp/zentaopms!956
This commit is contained in:
李玉春
2021-12-15 07:45:07 +00:00
+1 -1
View File
@@ -1699,7 +1699,7 @@ class projectModel extends model
}
/* Delete the execution linked products that is not linked with the execution. */
if($projectID)
if((int)$projectID > 0)
{
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq((int)$projectID)->fetchPairs('id');
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin($products)->exec();