From a25e7bd56c128fb2a1c673abf735b3e64706f9a8 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Sun, 26 Jun 2016 00:51:33 +0500 Subject: Added notifications via email Added notifications settings --- src/org/traccar/api/resource/GroupPermissionResource.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/api/resource/GroupPermissionResource.java') diff --git a/src/org/traccar/api/resource/GroupPermissionResource.java b/src/org/traccar/api/resource/GroupPermissionResource.java index 564a379d2..1fbf37a2b 100644 --- a/src/org/traccar/api/resource/GroupPermissionResource.java +++ b/src/org/traccar/api/resource/GroupPermissionResource.java @@ -38,7 +38,9 @@ public class GroupPermissionResource extends BaseResource { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().linkGroup(entity.getUserId(), entity.getGroupId()); Context.getPermissionsManager().refresh(); - Context.getGeofenceManager().refresh(); + if (Context.getGeofenceManager() != null) { + Context.getGeofenceManager().refresh(); + } return Response.ok(entity).build(); } @@ -47,7 +49,9 @@ public class GroupPermissionResource extends BaseResource { Context.getPermissionsManager().checkAdmin(getUserId()); Context.getDataManager().unlinkGroup(entity.getUserId(), entity.getGroupId()); Context.getPermissionsManager().refresh(); - Context.getGeofenceManager().refresh(); + if (Context.getGeofenceManager() != null) { + Context.getGeofenceManager().refresh(); + } return Response.noContent().build(); } -- cgit v1.2.3