Update myobject.class.php

This commit is contained in:
Laurent Destailleur 2025-02-17 19:53:09 +01:00 committed by GitHub
parent 23ae7b5e7d
commit 2c7b2a11d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
/**