fix: actioncomm.code have to be updated with correct c_actioncomm code (like in create) until we decide to remove this column

This commit is contained in:
Florian HENRY 2022-06-02 15:32:16 +02:00
parent f6e53b40da
commit 43207429ae

View File

@ -1127,7 +1127,7 @@ class ActionComm extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
$sql .= " SET percent = '".$this->db->escape($this->percentage)."'";
if ($this->type_id > 0) {
$sql .= ", fk_action = '".$this->db->escape($this->type_id)."'";
$sql .= ", fk_action = ".(int)$this->type_id;
$cactioncomm = new CActionComm($this->db);
$result = $cactioncomm->fetch($this->type_id);
if ($result>=0) {