diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 7eefeb1e4..938d8aa80 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -2735,6 +2735,11 @@ abstract class DBObject implements iDisplay $this->DBInsertSingleTable($sParentClass); } + $this->OnObjectKeyReady(); + + $this->DBWriteLinks(); + $this->WriteExternalAttributes(); + if ($bIsTransactionEnabled) { CMDBSource::Query('COMMIT'); @@ -2749,11 +2754,6 @@ abstract class DBObject implements iDisplay throw $e; } - $this->OnObjectKeyReady(); - - $this->DBWriteLinks(); - $this->WriteExternalAttributes(); - $this->m_bIsInDB = true; $this->m_bDirty = false; foreach ($this->m_aCurrValues as $sAttCode => $value)