aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/database/CommandsManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-07 19:23:16 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-07 19:23:16 -0700
commit5890e03199142f041dc19160329a740b4d01450d (patch)
tree1bf8bafbaa35a01d963f61f876a4a1de5258389e /src/main/java/org/traccar/database/CommandsManager.java
parent104281f161f622df8fca0c65a5b9969ceb03c46f (diff)
downloadtrackermap-server-5890e03199142f041dc19160329a740b4d01450d.tar.gz
trackermap-server-5890e03199142f041dc19160329a740b4d01450d.tar.bz2
trackermap-server-5890e03199142f041dc19160329a740b4d01450d.zip
Fix last position requests (fix #4863)
Diffstat (limited to 'src/main/java/org/traccar/database/CommandsManager.java')
-rw-r--r--src/main/java/org/traccar/database/CommandsManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/database/CommandsManager.java b/src/main/java/org/traccar/database/CommandsManager.java
index 8dd2ba8b7..2967b8abd 100644
--- a/src/main/java/org/traccar/database/CommandsManager.java
+++ b/src/main/java/org/traccar/database/CommandsManager.java
@@ -72,7 +72,7 @@ public class CommandsManager {
long deviceId = command.getDeviceId();
if (command.getTextChannel()) {
Device device = storage.getObject(Device.class, new Request(
- new Columns.All(), new Condition.Equals("id", "id", deviceId)));
+ new Columns.Include("positionId", "phone"), new Condition.Equals("id", "id", deviceId)));
Position position = storage.getObject(Position.class, new Request(
new Columns.All(), new Condition.Equals("id", "id", device.getPositionId())));
if (position != null) {