HostcommentQuery: Fix grouping when services are being joined
fixes #9503
This commit is contained in:
parent
8b4fb89a4b
commit
a7498ca0d8
|
@ -157,7 +157,7 @@ class HostcommentQuery extends IdoQuery
|
|||
public function getGroup()
|
||||
{
|
||||
$group = array();
|
||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('services')) {
|
||||
$group = array('c.comment_id', 'ho.object_id');
|
||||
if ($this->hasJoinedVirtualTable('hosts')) {
|
||||
$group[] = 'h.host_id';
|
||||
|
|
Loading…
Reference in New Issue