aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/NotificationManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-16 06:54:30 -0800
committerAnton Tananaev <anton@traccar.org>2022-11-16 06:54:30 -0800
commit4c973263a82d7c3515a8054a24e3396dfcab0e93 (patch)
tree2b73b215518c511e0bca2f35fee1dad2bc4cd84a /src/main/java/org/traccar/database/NotificationManager.java
parent77c1e617587947c431b77773f53da5e222f4dd61 (diff)
downloadtrackermap-server-4c973263a82d7c3515a8054a24e3396dfcab0e93.tar.gz
trackermap-server-4c973263a82d7c3515a8054a24e3396dfcab0e93.tar.bz2
trackermap-server-4c973263a82d7c3515a8054a24e3396dfcab0e93.zip
Fix missing device
Diffstat (limited to 'src/main/java/org/traccar/database/NotificationManager.java')
-rw-r--r--src/main/java/org/traccar/database/NotificationManager.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/database/NotificationManager.java b/src/main/java/org/traccar/database/NotificationManager.java
index 1eec7e097..cb971b082 100644
--- a/src/main/java/org/traccar/database/NotificationManager.java
+++ b/src/main/java/org/traccar/database/NotificationManager.java
@@ -24,6 +24,7 @@ import org.traccar.forward.EventData;
import org.traccar.forward.EventForwarder;
import org.traccar.geocoder.Geocoder;
import org.traccar.model.Calendar;
+import org.traccar.model.Device;
import org.traccar.model.Event;
import org.traccar.model.Geofence;
import org.traccar.model.Maintenance;
@@ -123,6 +124,7 @@ public class NotificationManager {
EventData eventData = new EventData();
eventData.setEvent(event);
eventData.setPosition(position);
+ eventData.setDevice(cacheManager.getObject(Device.class, event.getDeviceId()));
if (event.getGeofenceId() != 0) {
eventData.setGeofence(cacheManager.getObject(Geofence.class, event.getGeofenceId()));
}