aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/GroupResource.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-28 14:09:44 +1200
committerGitHub <noreply@github.com>2016-06-28 14:09:44 +1200
commit7327681f0bd2338f9c8ee3ea1b4a19dcc5f0de48 (patch)
tree0ea99ab937fbae96b35cc5dc62edbc74594af9e4 /src/org/traccar/api/resource/GroupResource.java
parent67f46c80d3b5e34440a2644f52b81dddfbaba5fa (diff)
parent61b2486353c742afe6214f0a0c5c2e9956ea3b97 (diff)
downloadtrackermap-server-7327681f0bd2338f9c8ee3ea1b4a19dcc5f0de48.tar.gz
trackermap-server-7327681f0bd2338f9c8ee3ea1b4a19dcc5f0de48.tar.bz2
trackermap-server-7327681f0bd2338f9c8ee3ea1b4a19dcc5f0de48.zip
Merge pull request #2052 from Abyss777/master
Notifications via email
Diffstat (limited to 'src/org/traccar/api/resource/GroupResource.java')
-rw-r--r--src/org/traccar/api/resource/GroupResource.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/org/traccar/api/resource/GroupResource.java b/src/org/traccar/api/resource/GroupResource.java
index dda9ab03b..957f39ebe 100644
--- a/src/org/traccar/api/resource/GroupResource.java
+++ b/src/org/traccar/api/resource/GroupResource.java
@@ -59,7 +59,9 @@ public class GroupResource extends BaseResource {
Context.getDataManager().addGroup(entity);
Context.getDataManager().linkGroup(getUserId(), entity.getId());
Context.getPermissionsManager().refresh();
- Context.getGeofenceManager().refresh();
+ if (Context.getGeofenceManager() != null) {
+ Context.getGeofenceManager().refresh();
+ }
return Response.ok(entity).build();
}
@@ -69,6 +71,9 @@ public class GroupResource extends BaseResource {
Context.getPermissionsManager().checkReadonly(getUserId());
Context.getPermissionsManager().checkGroup(getUserId(), id);
Context.getDataManager().updateGroup(entity);
+ if (Context.getGeofenceManager() != null) {
+ Context.getGeofenceManager().refresh();
+ }
return Response.ok(entity).build();
}
@@ -79,7 +84,9 @@ public class GroupResource extends BaseResource {
Context.getPermissionsManager().checkGroup(getUserId(), id);
Context.getDataManager().removeGroup(id);
Context.getPermissionsManager().refresh();
- Context.getGeofenceManager().refresh();
+ if (Context.getGeofenceManager() != null) {
+ Context.getGeofenceManager().refresh();
+ }
return Response.noContent().build();
}