#1074 Portal: errors when selecting Impact/Urgency, and if the user has access to his organization only.

SVN:trunk[3686]
This commit is contained in:
Romain Quetiez
2015-08-19 09:59:15 +00:00
parent d8113a3304
commit 76149633a1

View File

@@ -113,8 +113,16 @@ class WizardHelper
{
// For external keys: load the target object so that external fields
// get filled too
$oTargetObj = MetaModel::GetObject($oAttDef->GetTargetClass(), $value);
$oObj->Set($sAttCode, $oTargetObj);
$oTargetObj = MetaModel::GetObject($oAttDef->GetTargetClass(), $value, false);
if ($oTargetObj)
{
$oObj->Set($sAttCode, $oTargetObj);
}
else
{
// May happen for security reasons (portal, see ticket #1074)
$oObj->Set($sAttCode, $value);
}
}
else
{