Skip to content

Commit 1cf358f

Browse files
committed
Set user when getting device details.
1 parent da2b40f commit 1cf358f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transitclock/src/main/java/org/transitclock/custom/traccar/TraccarAVLModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public TraccarAVLModule(String agencyId) throws Throwable {
7373
client.setPassword(traccarPassword.getValue());
7474
api.setApiClient(client);
7575
user = api.sessionPost(traccarEmail.getValue(), traccarPassword.getValue());
76+
user.getId();
7677
if (user != null)
7778
logger.debug("Traccar login succeeded.");
7879
}
@@ -82,7 +83,7 @@ protected void getAndProcessData() throws Exception {
8283

8384
Collection<AvlReport> avlReportsReadIn = new ArrayList<AvlReport>();
8485

85-
List<Device> devices = api.devicesGet(true, null, null, null);
86+
List<Device> devices = api.devicesGet(true, user.getId(), null, null);
8687

8788
if (api != null && user != null) {
8889
List<Position> results = api.positionsGet(null, null, null, null);

0 commit comments

Comments
 (0)