From 857be16e1294c3ed2e7f5e624bcc838969dff565 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 May 2021 12:03:38 +0200 Subject: [PATCH] Log --- htdocs/societe/class/societe.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index e2eba54b489..7554ad2fbe2 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3329,6 +3329,8 @@ class Societe extends CommonObject */ public function setParent($id) { + dol_syslog(get_class($this).'::setParent', LOG_DEBUG); + if ($this->id) { // Check if the id we want to add as parent has not already one parent that is the current id we try to update if ($id > 0) { @@ -3342,8 +3344,6 @@ class Societe extends CommonObject } } - dol_syslog(get_class($this).'::setParent', LOG_DEBUG); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'societe SET parent = '.($id > 0 ? $id : 'null').' WHERE rowid = '.((int) $this->id); $resql = $this->db->query($sql);