aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/resource/PositionResource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/api/resource/PositionResource.java')
-rw-r--r--src/org/traccar/api/resource/PositionResource.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/api/resource/PositionResource.java b/src/org/traccar/api/resource/PositionResource.java
index 9d3cd9ae6..6dab51744 100644
--- a/src/org/traccar/api/resource/PositionResource.java
+++ b/src/org/traccar/api/resource/PositionResource.java
@@ -87,7 +87,7 @@ public class PositionResource extends BaseResource {
@QueryParam("deviceId") long deviceId, @QueryParam("from") String from, @QueryParam("to") String to)
throws SQLException {
Context.getPermissionsManager().checkDevice(getUserId(), deviceId);
- GpxBuilder gpx = new GpxBuilder(Context.getIdentityManager().getDeviceById(deviceId).getName());
+ GpxBuilder gpx = new GpxBuilder(Context.getIdentityManager().getById(deviceId).getName());
gpx.addPositions(Context.getDataManager().getPositions(
deviceId, DateUtil.parseDate(from), DateUtil.parseDate(to)));
return Response.ok(gpx.build()).header(HttpHeaders.CONTENT_DISPOSITION, CONTENT_DISPOSITION_VALUE_GPX).build();