From 9e193dbc6b2f3600d393eaf9c9c8668d40c5e7ef Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 13 Oct 2017 11:41:59 +0200 Subject: [PATCH] Sync: do not deal with 'disabled' for objects... ...without such properties (e.g. Sets) --- library/Director/Import/Sync.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index d7f457f3..6e041e83 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -594,6 +594,7 @@ class Sync } } + /** @var DbObject|IcingaObject $object */ foreach ($newObjects as $key => $object) { if (array_key_exists($key, $this->objects)) { switch ($this->rule->get('update_policy')) { @@ -605,7 +606,7 @@ class Sync // TODO: re-evaluate merge settings. vars.x instead of // just "vars" might suffice. $this->objects[$key]->merge($object, $this->replaceVars); - if (! $hasDisabled) { + if (! $hasDisabled && $object->hasProperty('disabled')) { $this->objects[$key]->resetProperty('disabled'); } break;