We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29ca493 commit a18c300Copy full SHA for a18c300
application/controllers/HistoryController.php
@@ -78,9 +78,11 @@ public function indexAction()
78
79
$history->filter(Filter::lessThanOrEqual('event_time', $before));
80
$this->filter($history, $filter);
81
+
82
+ $history->getWith()['history.host']->setJoinType('LEFT');
83
$history->getSelectBase()
- // Make sure we'll fetch service history entries only for services which still exist
- ->where(['history.service_id IS NULL', 'history_service.id IS NOT NULL'], Sql::ANY);
84
+ // Because of LEFT JOINs, make sure we'll fetch history entries only for items which still exist:
85
+ ->where(['history_host.id IS NOT NULL', 'history_service.id IS NOT NULL'], Sql::ANY);
86
87
yield $this->export($history);
88
0 commit comments