Fix throw inside transaction without rollback

This commit is contained in:
Pierre Goiffon
2019-08-13 17:40:29 +02:00
parent b743b7e2fb
commit a711a67f4c

View File

@@ -916,11 +916,11 @@ EOF
{
try
{
CMDBSource::Query('START TRANSACTION');
if (!empty($aErrors))
{
throw new CoreCannotSaveObjectException(array('id' => $oObj->GetKey(), 'class' => $sClass, 'issues' => $aErrors));
}
CMDBSource::Query('START TRANSACTION');
$oObj->DBUpdate();
CMDBSource::Query('COMMIT');
$sMessage = Dict::Format('UI:Class_Object_Updated', MetaModel::GetName(get_class($oObj)), $oObj->GetName());