diff --git a/module/action/model.php b/module/action/model.php index d7b5a50b06..92d0ed816b 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -57,7 +57,7 @@ class actionModel extends model /* Get product and project for this object. */ $productAndProject = $this->getProductAndProject($action->objectType, $objectID); $action->product = $productAndProject['product']; - $action->project = (int) $productAndProject['project']; + $action->project = $actionType == 'unlinkedfromproject' ? (int)$extra : (int)$productAndProject['project']; $this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec(); $actionID = $this->dbh->lastInsertID();