mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 05:58:46 +02:00
N°5906 - CRUD Event - move some code
This commit is contained in:
@@ -2986,11 +2986,7 @@ abstract class DBObject implements iDisplay
|
||||
// Ensure the update of the values (we are accessing the data directly)
|
||||
$this->DoComputeValues();
|
||||
$this->OnInsert();
|
||||
if ($this->m_iKey < 0) {
|
||||
// This was a temporary "memory" key: discard it so that DBInsertSingleTable will not try to use it!
|
||||
$this->m_iKey = null;
|
||||
$this->UpdateCurrentObjectInCrudStack();
|
||||
}
|
||||
|
||||
// If not automatically computed, then check that the key is given by the caller
|
||||
if (!MetaModel::IsAutoIncrementKey($sRootClass)) {
|
||||
if (empty($this->m_iKey)) {
|
||||
@@ -3006,6 +3002,7 @@ abstract class DBObject implements iDisplay
|
||||
if ($this->m_iKey < 0) {
|
||||
// This was a temporary "memory" key: discard it so that DBInsertSingleTable will not try to use it!
|
||||
$this->m_iKey = null;
|
||||
$this->UpdateCurrentObjectInCrudStack();
|
||||
}
|
||||
|
||||
$this->ComputeStopWatchesDeadline(true);
|
||||
|
||||
Reference in New Issue
Block a user