Fix location missing from API device list (#10215)

This commit is contained in:
Tony Murray
2019-05-13 09:45:19 -05:00
committed by GitHub
parent c097747d77
commit 882818d9f3

View File

@@ -311,7 +311,7 @@ function list_devices()
$order = 'd.`'.$order.'` ASC';
}
$select = " d.*, GROUP_CONCAT(dd.device_id) AS dependency_parent_id, GROUP_CONCAT(dd.hostname) AS dependency_parent_hostname, `lat`, `lng` ";
$select = " d.*, GROUP_CONCAT(dd.device_id) AS dependency_parent_id, GROUP_CONCAT(dd.hostname) AS dependency_parent_hostname, `location`, `lat`, `lng` ";
$join = " LEFT JOIN `device_relationships` AS dr ON dr.`child_device_id` = d.`device_id` LEFT JOIN `devices` AS dd ON dr.`parent_device_id` = dd.`device_id` LEFT JOIN `locations` ON `locations`.`id` = `d`.`location_id`";
if ($type == 'all' || empty($type)) {