IcingaObject: Allow replaceWith on non-apply Objects
This broke with assign_filter changes, we should not throw an error when the filter is actually null. replaceWith() re-sets all vars. refs #12033
This commit is contained in:
parent
8a5c111990
commit
f9f61be7aa
|
@ -396,7 +396,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
*/
|
||||
public function setAssign_filter($filter)
|
||||
{
|
||||
if (! $this->supportsAssignments()) {
|
||||
if (! $this->supportsAssignments() && $filter !== null) {
|
||||
if ($this->hasProperty('object_type')) {
|
||||
$type = $this->object_type;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue