From 2e7987b5df7611299aa76bcc9eca3424ce31d204 Mon Sep 17 00:00:00 2001 From: ninioe Date: Thu, 21 Jul 2016 07:58:28 +0300 Subject: protect Device positionId on clear history --- src/org/traccar/database/DataManager.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/org') diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java index 691c31643..710eceebb 100644 --- a/src/org/traccar/database/DataManager.java +++ b/src/org/traccar/database/DataManager.java @@ -416,6 +416,7 @@ public class DataManager { Date dateBefore = new Date(lastUpdate.getTime() - histDays * 24 * 3600 * 1000); QueryBuilder.create(dataSource, sql) + .setLong("positionId", device.getPositionId()) .setLong("deviceId", device.getId()) .setDate("serverTime", dateBefore) .executeUpdate(); -- cgit v1.2.3