Skip to content

Commit 2225d04

Browse files
committed
Bring parent uuids in correct order
The uuid of the nearest parent was checked last but had to be checked first. This resulted in a bug that caused the monitoring rules of the leaf notes to be overwritten by those of the parents.
1 parent a700003 commit 2225d04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/Vspheredb/Monitoring/Rule/MonitoringRulesTree.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function hasConfigurationForUuid($uuid): bool
8888
public function getInheritedSettingsFor(BaseDbObject $object): InheritedSettings
8989
{
9090
$uuid = $object->object()->get('parent_uuid');
91-
$parents = $this->listParentUuidsFor($uuid);
92-
$parents[] = $uuid;
91+
$parents = [$uuid];
92+
array_push($parents, ...$this->listParentUuidsFor($uuid));
9393

9494
return InheritedSettings::loadForUuids($parents, $this, $this->db);
9595
}

0 commit comments

Comments
 (0)