aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/reports
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-28 17:02:23 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-28 17:02:23 -0800
commit51704590a835057bf4850a5eaf8c5037d20f648a (patch)
treec38acebce6cfec36ead21918d6272a99452b9ac5 /src/main/java/org/traccar/reports
parent551298664bbac541450d83a021a2f8d77e65b216 (diff)
downloadtrackermap-server-51704590a835057bf4850a5eaf8c5037d20f648a.tar.gz
trackermap-server-51704590a835057bf4850a5eaf8c5037d20f648a.tar.bz2
trackermap-server-51704590a835057bf4850a5eaf8c5037d20f648a.zip
Migrate long config keys
Diffstat (limited to 'src/main/java/org/traccar/reports')
-rw-r--r--src/main/java/org/traccar/reports/ReportUtils.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/reports/ReportUtils.java b/src/main/java/org/traccar/reports/ReportUtils.java
index 8dd77606c..d8dfeed4c 100644
--- a/src/main/java/org/traccar/reports/ReportUtils.java
+++ b/src/main/java/org/traccar/reports/ReportUtils.java
@@ -26,6 +26,7 @@ import org.jxls.transform.Transformer;
import org.jxls.transform.poi.PoiTransformer;
import org.jxls.util.TransformerFactory;
import org.traccar.Context;
+import org.traccar.config.Keys;
import org.traccar.database.DeviceManager;
import org.traccar.database.IdentityManager;
import org.traccar.handler.events.MotionEventHandler;
@@ -58,7 +59,7 @@ public final class ReportUtils {
}
public static void checkPeriodLimit(Date from, Date to) {
- long limit = Context.getConfig().getLong("report.periodLimit") * 1000;
+ long limit = Context.getConfig().getLong(Keys.REPORT_PERIOD_LIMIT) * 1000;
if (limit > 0 && to.getTime() - from.getTime() > limit) {
throw new IllegalArgumentException("Time period exceeds the limit");
}