Skip to content

Commit

Permalink
Sync: do not deal with 'disabled' for objects...
Browse files Browse the repository at this point in the history
...without such properties (e.g. Sets)
  • Loading branch information
Thomas-Gelf committed Oct 13, 2017
1 parent 8ec0fad commit 9e193db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Director/Import/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ protected function prepare()
}
}

/** @var DbObject|IcingaObject $object */
foreach ($newObjects as $key => $object) {
if (array_key_exists($key, $this->objects)) {
switch ($this->rule->get('update_policy')) {
Expand All @@ -605,7 +606,7 @@ protected function prepare()
// 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;
Expand Down

0 comments on commit 9e193db

Please sign in to comment.