aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/reports/Events.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/reports/Events.java')
-rw-r--r--src/org/traccar/reports/Events.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/reports/Events.java b/src/org/traccar/reports/Events.java
index 63077de32..a13aeeeb4 100644
--- a/src/org/traccar/reports/Events.java
+++ b/src/org/traccar/reports/Events.java
@@ -42,6 +42,7 @@ public final class Events {
public static Collection<Event> getObjects(long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Collection<String> types, Date from, Date to) throws SQLException {
+ ReportUtils.checkPeriodLimit(from, to);
ArrayList<Event> result = new ArrayList<>();
for (long deviceId: ReportUtils.getDeviceList(deviceIds, groupIds)) {
Context.getPermissionsManager().checkDevice(userId, deviceId);
@@ -62,6 +63,7 @@ public final class Events {
public static void getExcel(OutputStream outputStream,
long userId, Collection<Long> deviceIds, Collection<Long> groupIds,
Collection<String> types, Date from, Date to) throws SQLException, IOException {
+ ReportUtils.checkPeriodLimit(from, to);
ArrayList<DeviceReport> devicesEvents = new ArrayList<>();
ArrayList<String> sheetNames = new ArrayList<>();
HashMap<Long, String> geofenceNames = new HashMap<>();