diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 8c0441e84c..e0dff1466b 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -3240,7 +3240,13 @@ EOF $aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs); if (is_array($aAllowedValues) && count($aAllowedValues) == 1) { $aValues = array_keys($aAllowedValues); - $this->Set($sAttCode, $aValues[0]); + if ($oAttDef->IsLinkSet()) { + $oObjectSet = $this->Get($sAttCode); + $oObjectSet->AddItem(MetaModel::GetObject($oAttDef->GetLinkedClass(), $aValues[0])); + $this->Set($sAttCode, $oObjectSet); + } else { + $this->Set($sAttCode, $aValues[0]); + } } } }