diff --git a/core/relationgraph.class.inc.php b/core/relationgraph.class.inc.php index e7af4ff9f..73b8d7217 100644 --- a/core/relationgraph.class.inc.php +++ b/core/relationgraph.class.inc.php @@ -540,10 +540,13 @@ class RelationGraph extends SimpleGraph { if ($oAttDef->Get('relation_code') == $sRelCode) { - if ($oAttDef->Get('neighbour_id') == $aQueryInfo['sNeighbour']) + if ($oAttDef->Get('from_class') == $aQueryInfo['sFromClass']) { - $oRet = $oAttDef; - break; + if ($oAttDef->Get('neighbour_id') == $aQueryInfo['sNeighbour']) + { + $oRet = $oAttDef; + break; + } } } }