summaryrefslogtreecommitdiff
path: root/app/Model/ProjectModel.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/ProjectModel.php')
-rw-r--r--app/Model/ProjectModel.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Model/ProjectModel.php b/app/Model/ProjectModel.php
index 7f489c75..7f55a9fb 100644
--- a/app/Model/ProjectModel.php
+++ b/app/Model/ProjectModel.php
@@ -462,7 +462,13 @@ class ProjectModel extends Base
*/
public function remove($project_id)
{
- return $this->db->table(self::TABLE)->eq('id', $project_id)->remove();
+ $this->db->startTransaction();
+
+ $this->db->table(TagModel::TABLE)->eq('project_id', $project_id)->remove();
+ $result = $this->db->table(self::TABLE)->eq('id', $project_id)->remove();
+
+ $this->db->closeTransaction();
+ return $result;
}
/**