diff --git a/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php b/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php index cb3f06a9a..b4273e45c 100644 --- a/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php +++ b/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php @@ -32,7 +32,11 @@ protected function createStatistics(): array $hostStats = new HostStatistics($this->item); $hostStats->setBaseFilter(Filter::equal('hostgroup.name', $this->item->name)); - if (isset($this->table) && $this->table->hasBaseFilter()) { + if ( + isset($this->table) + && $this->table->hasBaseFilter() + && ! $hostStats->getBaseFilter()->sameAs($this->table->getBaseFilter()) + ) { $hostStats->setBaseFilter( Filter::all($hostStats->getBaseFilter(), $this->table->getBaseFilter()) ); @@ -41,7 +45,11 @@ protected function createStatistics(): array $serviceStats = new ServiceStatistics($this->item); $serviceStats->setBaseFilter(Filter::equal('hostgroup.name', $this->item->name)); - if (isset($this->table) && $this->table->hasBaseFilter()) { + if ( + isset($this->table) + && $this->table->hasBaseFilter() + && ! $serviceStats->getBaseFilter()->sameAs($this->table->getBaseFilter()) + ) { $serviceStats->setBaseFilter( Filter::all($serviceStats->getBaseFilter(), $this->table->getBaseFilter()) );