diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-14 16:36:26 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-14 16:36:26 -0700 |
commit | 34fefbffa49925a5d337ff388fb9db400d707f8b (patch) | |
tree | 8f4dcf10228b8c4941777f767df8de7eef9fc5ad /src/main | |
parent | a9199ab710056dda371aa3dd25cffc225374c0d6 (diff) | |
download | trackermap-server-34fefbffa49925a5d337ff388fb9db400d707f8b.tar.gz trackermap-server-34fefbffa49925a5d337ff388fb9db400d707f8b.tar.bz2 trackermap-server-34fefbffa49925a5d337ff388fb9db400d707f8b.zip |
Null check geofenceIds (fix #4896)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/model/Device.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/model/Device.java b/src/main/java/org/traccar/model/Device.java index f3debd1f2..57ba07624 100644 --- a/src/main/java/org/traccar/model/Device.java +++ b/src/main/java/org/traccar/model/Device.java @@ -91,7 +91,11 @@ public class Device extends GroupedModel { @QueryIgnore public void setGeofenceIds(List<? extends Number> geofenceIds) { - this.geofenceIds = geofenceIds.stream().map(Number::longValue).collect(Collectors.toList()); + if (geofenceIds != null) { + this.geofenceIds = geofenceIds.stream().map(Number::longValue).collect(Collectors.toList()); + } else { + this.geofenceIds = null; + } } private String phone; |