diff options
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/reports/CombinedReportProvider.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/reports/CombinedReportProvider.java b/src/main/java/org/traccar/reports/CombinedReportProvider.java index d47a91bef..afe146e91 100644 --- a/src/main/java/org/traccar/reports/CombinedReportProvider.java +++ b/src/main/java/org/traccar/reports/CombinedReportProvider.java @@ -63,10 +63,11 @@ public class CombinedReportProvider { new Condition.Equals("deviceId", device.getId()), new Condition.Between("eventTime", "from", from, "to", to)), new Order("eventTime"))); - item.setEvents(events); + item.setEvents(events.stream() + .filter(p -> p.getPositionId() > 0) + .collect(Collectors.toList())); var eventPositions = events.stream() .map(Event::getPositionId) - .filter(positionId -> positionId > 0) .collect(Collectors.toSet()); item.setPositions(positions.stream() .filter(p -> eventPositions.contains(p.getId())) |