TemplateTree: only use 'unstored' logic when...

...imports have been modified

fixes #1088
This commit is contained in:
Thomas Gelf 2017-08-21 21:53:47 +02:00
parent 179054b239
commit fc9425ee89

View File

@ -132,7 +132,10 @@ class TemplateTree
public function getAncestorsFor(IcingaObject $object)
{
if ($object->hasBeenModified()) {
if ($object->hasBeenModified()
&& $object->gotImports()
&& $object->imports()->hasBeenModified()
) {
return $this->getAncestorsForUnstoredObject($object);
} else {
return $this->getAncestorsById($object->getProperty('id'));