浏览代码

Properly display linksets with undefined external keys

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@612 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 15 年之前
父节点
当前提交
721b2657c7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/ui.linkswidget.class.inc.php

+ 1 - 1
application/ui.linkswidget.class.inc.php

@@ -213,7 +213,7 @@ class UILinksWidget
 			foreach($aObject as $sAttCode => $value)
 			{
 				$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
-				if ($oAttDef->IsExternalKey())
+				if ($oAttDef->IsExternalKey() && ($value != 0))
 				{
 					$oTargetObj = MetaModel::GetObject($oAttDef->GetTargetClass(), $value); // @@ optimization, don't do & query per object in the set !
 					$oObj->Set($sAttCode, $oTargetObj);