Fix call an undefined method Filterable::fetchRow() error

This commit is contained in:
Yonas Habteab 2023-08-22 09:18:13 +02:00 committed by Sukhwinder Dhillon
parent f74a054d8b
commit 9aabeb1e1c
2 changed files with 4 additions and 6 deletions

View file

@ -55,9 +55,8 @@ class HostController extends Controller
->from('hoststatus', array('host_name'))
->where('host_name', $hostName);
/** @var DataView $restrictedQuery */
$restrictedQuery = $this->applyRestriction('monitoring/filter/objects', $query);
if ($restrictedQuery->fetchRow() !== false) {
$this->applyRestriction('monitoring/filter/objects', $query);
if ($query->fetchRow() !== false) {
$this->redirectNow(Url::fromPath('monitoring/host/show')->setParams($this->params));
}
}

View file

@ -62,9 +62,8 @@ class ServiceController extends Controller
->where('host_name', $hostName)
->where('service_description', $serviceName);
/** @var DataView $restrictedQuery */
$restrictedQuery = $this->applyRestriction('monitoring/filter/objects', $query);
if ($restrictedQuery->fetchRow() !== false) {
$this->applyRestriction('monitoring/filter/objects', $query);
if ($query->fetchRow() !== false) {
$this->redirectNow(Url::fromPath('monitoring/service/show')->setParams($this->params));
}
}