diff options
Diffstat (limited to 'src/main/java/org/traccar/model')
-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; |