ApplyRulesTable: fix non-service tables...

...as they have no apply_for column

fixes #1866
This commit is contained in:
Thomas Gelf 2019-05-06 21:21:13 +02:00
parent c3ca6408f1
commit d68c0a0c03

View File

@ -209,8 +209,12 @@ class ApplyRulesTable extends ZfQueryBasedTable
'object_name' => 'o.object_name',
'disabled' => 'o.disabled',
'assign_filter' => 'o.assign_filter',
'apply_for' => 'o.apply_for',
'apply_for' => '(NULL)',
];
if ($table === 'icinga_service') {
$columns['apply_for'] = 'o.apply_for';
}
$query = $this->db()->select()->from(
['o' => $table],
$columns