aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Events.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-10-20 09:55:49 +0500
committerAbyss777 <abyss@fox5.ru>2016-10-20 09:55:49 +0500
commit40d7ff2f9505150c85e87332fac9f67725beba8e (patch)
tree34c14e3ff4a7b9d94d68cd46d3a50b4bfefa7fdd /src/org/traccar/reports/Events.java
parent45302036168fe3adf1d9d184cd68e92e15dd3b1f (diff)
downloadtrackermap-server-40d7ff2f9505150c85e87332fac9f67725beba8e.tar.gz
trackermap-server-40d7ff2f9505150c85e87332fac9f67725beba8e.tar.bz2
trackermap-server-40d7ff2f9505150c85e87332fac9f67725beba8e.zip
- Fix export empty reports
- Cleanup templates metadata
Diffstat (limited to 'src/org/traccar/reports/Events.java')
-rw-r--r--src/org/traccar/reports/Events.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/org/traccar/reports/Events.java b/src/org/traccar/reports/Events.java
index 37bf7b227..77d995f56 100644
--- a/src/org/traccar/reports/Events.java
+++ b/src/org/traccar/reports/Events.java
@@ -98,20 +98,18 @@ public final class Events {
iterator.remove();
}
}
- if (!events.isEmpty()) {
- DeviceReport deviceEvents = new DeviceReport();
- Device device = Context.getIdentityManager().getDeviceById(deviceId);
- deviceEvents.setDeviceName(device.getName());
- sheetNames.add(deviceEvents.getDeviceName());
- if (device.getGroupId() != 0) {
- Group group = Context.getDeviceManager().getGroupById(device.getGroupId());
- if (group != null) {
- deviceEvents.setGroupName(group.getName());
- }
+ DeviceReport deviceEvents = new DeviceReport();
+ Device device = Context.getIdentityManager().getDeviceById(deviceId);
+ deviceEvents.setDeviceName(device.getName());
+ sheetNames.add(deviceEvents.getDeviceName());
+ if (device.getGroupId() != 0) {
+ Group group = Context.getDeviceManager().getGroupById(device.getGroupId());
+ if (group != null) {
+ deviceEvents.setGroupName(group.getName());
}
- deviceEvents.setObjects(events);
- devicesEvents.add(deviceEvents);
}
+ deviceEvents.setObjects(events);
+ devicesEvents.add(deviceEvents);
}
String templatePath = Context.getConfig().getString("report.templatesPath",
"templates/export/");