diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 341924ffa13..8bdee37759b 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -536,6 +536,16 @@ class ActionComm extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $res=$this->db->query($sql); + if ($res < 0) { + $this->error=$this->db->lasterror(); + $error++; + } + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources"; + $sql.= " WHERE fk_actioncomm=".$this->id; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $res=$this->db->query($sql); if ($res < 0) {