aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Route.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/reports/Route.java')
-rw-r--r--src/org/traccar/reports/Route.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/org/traccar/reports/Route.java b/src/org/traccar/reports/Route.java
index 7cefe04a3..6992c89cc 100644
--- a/src/org/traccar/reports/Route.java
+++ b/src/org/traccar/reports/Route.java
@@ -68,20 +68,18 @@ public final class Route {
for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
Collection<Position> positions = Context.getDataManager().getPositions(deviceId, from, to);
- if (positions != null && !positions.isEmpty()) {
- DeviceReport deviceRoutes = new DeviceReport();
- Device device = Context.getIdentityManager().getDeviceById(deviceId);
- deviceRoutes.setDeviceName(device.getName());
- sheetNames.add(deviceRoutes.getDeviceName());
- if (device.getGroupId() != 0) {
- Group group = Context.getDeviceManager().getGroupById(device.getGroupId());
- if (group != null) {
- deviceRoutes.setGroupName(group.getName());
- }
+ DeviceReport deviceRoutes = new DeviceReport();
+ Device device = Context.getIdentityManager().getDeviceById(deviceId);
+ deviceRoutes.setDeviceName(device.getName());
+ sheetNames.add(deviceRoutes.getDeviceName());
+ if (device.getGroupId() != 0) {
+ Group group = Context.getDeviceManager().getGroupById(device.getGroupId());
+ if (group != null) {
+ deviceRoutes.setGroupName(group.getName());
}
- deviceRoutes.setObjects(positions);
- devicesRoutes.add(deviceRoutes);
}
+ deviceRoutes.setObjects(positions);
+ devicesRoutes.add(deviceRoutes);
}
String templatePath = Context.getConfig().getString("report.templatesPath",
"templates/export/");