legacy/IcingaObject: Render groups only when it is a stored object

This broke activity log.
This commit is contained in:
Markus Frosch 2018-05-17 13:02:09 +02:00
parent ff0553c9dd
commit d6b9f3137a

View File

@ -2152,7 +2152,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
*/ */
protected function renderLegacyGroups() protected function renderLegacyGroups()
{ {
if ($this->supportsGroups()) { if ($this->supportsGroups() && $this->hasBeenLoadedFromDb()) {
$applied = array(); $applied = array();
if ($this instanceof IcingaHost) { if ($this instanceof IcingaHost) {
$applied = $this->getAppliedGroups(); $applied = $this->getAppliedGroups();