IcingaObject: do not resolve imports when...
...resolving related objects
This commit is contained in:
parent
da2968a6d3
commit
fd400977f2
|
@ -496,12 +496,6 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
$this->resolveUnresolvedRelatedProperty($name);
|
||||
}
|
||||
|
||||
if ($this->supportsImports() && $this->imports !== null
|
||||
&& $this->imports()->hasBeenModified()
|
||||
) {
|
||||
$this->imports()->getObjects();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -1337,6 +1331,9 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
protected function beforeStore()
|
||||
{
|
||||
$this->resolveUnresolvedRelatedProperties();
|
||||
if ($this->gotImports()) {
|
||||
$this->imports()->getObjects();
|
||||
}
|
||||
}
|
||||
|
||||
public function onInsert()
|
||||
|
|
|
@ -239,6 +239,10 @@ abstract class DirectorObjectForm extends DirectorForm
|
|||
$old = $object->get($key);
|
||||
$object->set($key, $element->getValue());
|
||||
$object->resolveUnresolvedRelatedProperties();
|
||||
|
||||
if ($key === 'imports') {
|
||||
$object->imports()->getObjects();
|
||||
}
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
if ($old !== null) {
|
||||
|
@ -371,7 +375,7 @@ abstract class DirectorObjectForm extends DirectorForm
|
|||
$object->set($key, $value);
|
||||
if ($object instanceof IcingaObject) {
|
||||
if ($this->resolvedImports !== false) {
|
||||
$object->resolveUnresolvedRelatedProperties();
|
||||
$object->imports()->getObjects();
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
|
Loading…
Reference in New Issue