mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
- Verification of invalid external fields (i.e fields pointing to a non-existing field in the target class).
SVN:trunk[392]
This commit is contained in:
@@ -1239,6 +1239,7 @@ class AttributeExternalField extends AttributeDefinition
|
||||
{
|
||||
$oKeyAttDef = $this->GetKeyAttDef();
|
||||
$oExtAttDef = MetaModel::GetAttributeDef($oKeyAttDef->Get("targetclass"), $this->Get("target_attcode"));
|
||||
if (!is_object($oExtAttDef)) throw new CoreException("Invalid external field ".$this->GetCode()." in class ".$this->GetHostClass().". The class ".$oKeyAttDef->Get("targetclass")." has no attribute ".$this->Get("target_attcode"));
|
||||
return $oExtAttDef;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user