diff options
author | Abyss777 <abyss@fox5.ru> | 2016-06-26 00:51:33 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-06-26 00:51:33 +0500 |
commit | a25e7bd56c128fb2a1c673abf735b3e64706f9a8 (patch) | |
tree | a99d2cde526f97082d7bc95531772b6835064fcd /src/org/traccar/api/resource/GroupResource.java | |
parent | 67f46c80d3b5e34440a2644f52b81dddfbaba5fa (diff) | |
download | traccar-server-a25e7bd56c128fb2a1c673abf735b3e64706f9a8.tar.gz traccar-server-a25e7bd56c128fb2a1c673abf735b3e64706f9a8.tar.bz2 traccar-server-a25e7bd56c128fb2a1c673abf735b3e64706f9a8.zip |
Added notifications via email
Added notifications settings
Diffstat (limited to 'src/org/traccar/api/resource/GroupResource.java')
-rw-r--r-- | src/org/traccar/api/resource/GroupResource.java | 11 |
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(); } |