From 182d1b519b2aba12ca541ceba8aae4756f674e09 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 5 Oct 2021 18:10:50 +0200 Subject: [PATCH] IcingaObject: do not load groups when we have... ...no id. With branches this is now possible --- library/Director/Objects/IcingaObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php index b29ecc17..cf2260df 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -836,7 +836,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer { $this->assertGroupsSupport(); if ($this->groups === null) { - if ($this->hasBeenLoadedFromDb()) { + if ($this->hasBeenLoadedFromDb() && $this->get('id')) { $this->groups = IcingaObjectGroups::loadForStoredObject($this); } else { $this->groups = new IcingaObjectGroups($this);