mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
N°1420 - Limit count
SVN:2.4[5838]
This commit is contained in:
@@ -2568,7 +2568,7 @@ EOF
|
||||
if ($oAttDef->IsExternalKey())
|
||||
{
|
||||
$oAllowedValues = MetaModel::GetAllowedValuesAsObjectSet($sClass, $sAttCode, $aArgs);
|
||||
if ($oAllowedValues->Count() == 1)
|
||||
if ($oAllowedValues->Count(2) == 1)
|
||||
{
|
||||
$oRemoteObj = $oAllowedValues->Fetch();
|
||||
$oObj->Set($sAttCode, $oRemoteObj->GetKey());
|
||||
@@ -2687,7 +2687,7 @@ EOF
|
||||
if ($oAttDef->IsExternalKey())
|
||||
{
|
||||
$oAllowedValues = MetaModel::GetAllowedValuesAsObjectSet($sClass, $sAttCode, $aArgs, '', $this->Get($sAttCode));
|
||||
if ($oAllowedValues->Count() == 1)
|
||||
if ($oAllowedValues->Count(2) == 1)
|
||||
{
|
||||
$oRemoteObj = $oAllowedValues->Fetch();
|
||||
$this->Set($sAttCode, $oRemoteObj->GetKey());
|
||||
|
||||
Reference in New Issue
Block a user