fix devices missing from graph view (#11886)

devices without a location were not showing
This commit is contained in:
Tony Murray
2020-07-01 10:47:23 -05:00
committed by GitHub
parent dd8844980f
commit 98502325db

View File

@@ -202,7 +202,7 @@ if ($format == "graph") {
$where .= " )";
}
$query = "SELECT * FROM `devices`,locations WHERE devices.location_id = locations.id ";
$query = "SELECT * FROM `devices` LEFT JOIN `locations` ON `devices`.`location_id` = `locations`.`id` WHERE 1";
if (isset($where)) {
$query .= $where;