mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 15:52:24 +02:00
N°5918 - Fix activity panel disappearing when DoCheckToWrite fails
This commit is contained in:
@@ -2792,12 +2792,6 @@ abstract class DBObject implements iDisplay
|
|||||||
$this->DoComputeValues();
|
$this->DoComputeValues();
|
||||||
$this->OnInsert();
|
$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;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If not automatically computed, then check that the key is given by the caller
|
// If not automatically computed, then check that the key is given by the caller
|
||||||
if (!MetaModel::IsAutoIncrementKey($sRootClass))
|
if (!MetaModel::IsAutoIncrementKey($sRootClass))
|
||||||
{
|
{
|
||||||
@@ -2814,6 +2808,12 @@ abstract class DBObject implements iDisplay
|
|||||||
throw new CoreCannotSaveObjectException(array('issues' => $aIssues, 'class' => get_class($this), 'id' => $this->GetKey()));
|
throw new CoreCannotSaveObjectException(array('issues' => $aIssues, 'class' => get_class($this), 'id' => $this->GetKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
// Stop watches
|
// Stop watches
|
||||||
$sState = $this->GetState();
|
$sState = $this->GetState();
|
||||||
if ($sState != '')
|
if ($sState != '')
|
||||||
|
|||||||
Reference in New Issue
Block a user