diff --git a/module/pipeline/model.php b/module/pipeline/model.php index 5fbe19c650..458811ee5e 100644 --- a/module/pipeline/model.php +++ b/module/pipeline/model.php @@ -129,13 +129,14 @@ class pipelineModel extends model * @param string $id the id to be deleted * @param string $object the action object * @access public - * @return bool + * @return int */ public function delete($id, $object = 'gitlab') { $this->dao->update(TABLE_PIPELINE)->set('deleted')->eq(1)->where('id')->eq($id)->exec(); $this->loadModel('action')->create($object, $id, 'deleted', '', ACTIONMODEL::CAN_UNDELETED); - return true; + $actionID = $this->dao->lastInsertID(); + return $actionID; } } diff --git a/module/sonarqube/control.php b/module/sonarqube/control.php index d525c4cbb4..9d9a69c83f 100644 --- a/module/sonarqube/control.php +++ b/module/sonarqube/control.php @@ -114,7 +114,7 @@ class sonarqube extends control $oldSonarQube = $this->sonarqube->getByID($sonarqubeID); $this->loadModel('action'); - $this->loadModel('pipeline')->delete($sonarqubeID, 'sonarqube'); + $actionID = $this->loadModel('pipeline')->delete($sonarqubeID, 'sonarqube'); $sonarQube = $this->sonarqube->getByID($sonarqubeID); $changes = common::createChanges($oldSonarQube, $sonarQube);