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:
Markus Frosch 2016-10-27 15:39:39 +02:00
parent 8a5c111990
commit f9f61be7aa
1 changed files with 1 additions and 1 deletions

View File

@ -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 {