mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-02 06:58:49 +02:00
Compare commits
1 Commits
develop
...
feature/93
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f860623c4 |
@@ -1186,6 +1186,12 @@ try {
|
|||||||
if ($bRes) {
|
if ($bRes) {
|
||||||
try {
|
try {
|
||||||
$bApplyStimulus = $oObj->ApplyStimulus($sStimulus); // will write the object in the DB
|
$bApplyStimulus = $oObj->ApplyStimulus($sStimulus); // will write the object in the DB
|
||||||
|
}
|
||||||
|
catch (CoreCannotSaveObjectException $e) {
|
||||||
|
// Rollback to the previous state... by reloading the object from the database and applying the modifications again
|
||||||
|
$oObj = MetaModel::GetObject(get_class($oObj), $oObj->GetKey());
|
||||||
|
$oObj->UpdateObjectFromPostedForm('', array_keys($aExpectedAttributes), $aExpectedAttributes);
|
||||||
|
$sIssues = implode(' ', $e->getIssues());
|
||||||
} catch (CoreException $e) {
|
} catch (CoreException $e) {
|
||||||
// Rollback to the previous state... by reloading the object from the database and applying the modifications again
|
// Rollback to the previous state... by reloading the object from the database and applying the modifications again
|
||||||
$oObj = MetaModel::GetObject(get_class($oObj), $oObj->GetKey());
|
$oObj = MetaModel::GetObject(get_class($oObj), $oObj->GetKey());
|
||||||
|
|||||||
Reference in New Issue
Block a user