From f9f61be7aa454afda474bd61969b6bb20ca2b031 Mon Sep 17 00:00:00 2001 From: Markus Frosch Date: Thu, 27 Oct 2016 15:39:39 +0200 Subject: [PATCH] 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 --- 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 438eceb7..f0eb1b56 100644 --- a/library/Director/Objects/IcingaObject.php +++ b/library/Director/Objects/IcingaObject.php @@ -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 {