diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-30 22:48:37 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-30 22:48:37 +1200 |
commit | 1ac0692d07898889156a18848a23d6af889fa6c5 (patch) | |
tree | c9a2d83ac7e1970dc7ca90d213861dc5052f6809 /src/org/traccar/http/DeviceServlet.java | |
parent | 09ab10ae55444bbd5e09a82fbb41d2f4903a9029 (diff) | |
download | trackermap-server-1ac0692d07898889156a18848a23d6af889fa6c5.tar.gz trackermap-server-1ac0692d07898889156a18848a23d6af889fa6c5.tar.bz2 trackermap-server-1ac0692d07898889156a18848a23d6af889fa6c5.zip |
Fix database init sequence
Diffstat (limited to 'src/org/traccar/http/DeviceServlet.java')
-rw-r--r-- | src/org/traccar/http/DeviceServlet.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/http/DeviceServlet.java b/src/org/traccar/http/DeviceServlet.java index 1e8e1f047..2a3e15a80 100644 --- a/src/org/traccar/http/DeviceServlet.java +++ b/src/org/traccar/http/DeviceServlet.java @@ -47,6 +47,7 @@ public class DeviceServlet extends BaseServlet { Device device = JsonConverter.objectFromJson(req.getReader(), new Device()); Context.getDataManager().addDevice(device); Context.getDataManager().linkDevice(getUserId(req), device.getId()); + Context.getPermissionsManager().refresh(); sendResponse(resp.getWriter(), JsonConverter.objectToJson(device)); } @@ -61,6 +62,7 @@ public class DeviceServlet extends BaseServlet { Device device = JsonConverter.objectFromJson(req.getReader(), new Device()); Context.getPermissionsManager().checkDevice(getUserId(req), device.getId()); Context.getDataManager().removeDevice(device); + Context.getPermissionsManager().refresh(); sendResponse(resp.getWriter(), true); } |