IcingaObject: do not load groups when we have...
...no id. With branches this is now possible
This commit is contained in:
parent
1a5df745e3
commit
182d1b519b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue