Skip to content

Commit

Permalink
For #353 - mileage report wasn't working for devices that don't have …
Browse files Browse the repository at this point in the history
…speed limit set up (screw you, copy-paste!)
  • Loading branch information
vitalidze committed Nov 22, 2015
1 parent a3a8654 commit 3b9a274
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/java/org/traccar/web/server/reports/ReportMD.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,10 @@ void generateImpl(Report report) throws IOException {

for (Device device : getDevices(report)) {
List<Position> positions;
if (device.getSpeedLimit() == null) {
positions = Collections.emptyList();
} else {
try {
positions = dataService.getPositions(device, report.getFromDate(), report.getToDate(), !report.isDisableFilter());
} catch (AccessDeniedException ade) {
continue;
}
try {
positions = dataService.getPositions(device, report.getFromDate(), report.getToDate(), !report.isDisableFilter());
} catch (AccessDeniedException ade) {
continue;
}

panelStart();
Expand Down

0 comments on commit 3b9a274

Please sign in to comment.