aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/api/resource/DeviceResource.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/org/traccar/api/resource/DeviceResource.java b/src/org/traccar/api/resource/DeviceResource.java
index 0f75b5e33..ce46b4e29 100644
--- a/src/org/traccar/api/resource/DeviceResource.java
+++ b/src/org/traccar/api/resource/DeviceResource.java
@@ -64,9 +64,8 @@ public class DeviceResource extends BaseResource {
} else {
ArrayList<Device> devices = new ArrayList<>();
for (Long deviceId : deviceIds) {
- Device device = Context.getDeviceManager().getDeviceById(deviceId);
- Context.getPermissionsManager().checkDevice(getUserId(), device.getId());
- devices.add(device);
+ Context.getPermissionsManager().checkDevice(getUserId(), deviceId);
+ devices.add(Context.getDeviceManager().getDeviceById(deviceId));
}
return devices;
}