From 2c7b2a11d04b28066563ca4dbb761a6fd08a7577 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Feb 2025 19:53:09 +0100 Subject: [PATCH] Update myobject.class.php --- htdocs/modulebuilder/template/class/myobject.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index d77e6a64940..ac2829c0323 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -282,13 +282,15 @@ class MyObject extends CommonObject */ public function create(User $user, $notrigger = 0) { - $resultcreate = $this->createCommon($user, $notrigger); + $result = $this->createCommon($user, $notrigger); // uncomment lines below if you want to validate object after creation + // if ($result > 0) { // $this->fetch($this->id); // needed to retrieve some fields (ie date_creation for masked ref) - // $resultvalidate= $this->validate($user, $notrigger); + // $result= $this->validate($user, $notrigger); + // } - return $resultcreate; + return $result; } /**