IcingaObject: fix unmodified multi rel properties
Former object in activity log used to be buggy in case you removed all relations of a multi-relation properties
This commit is contained in:
parent
a7e1633b3f
commit
7546a9db66
|
@ -932,6 +932,10 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
return true;
|
||||
}
|
||||
|
||||
if ($this->propertyIsMultiRelation($key)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return parent::hasProperty($key);
|
||||
}
|
||||
|
||||
|
@ -1663,8 +1667,9 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
}
|
||||
|
||||
foreach ($this->loadAllMultiRelations() as $key => $rel) {
|
||||
if (count($rel)) {
|
||||
$props[$key] = $rel->listOriginalNames();
|
||||
$old = $rel->listOriginalNames();
|
||||
if (! empty($old)) {
|
||||
$props[$key] = $old;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue