aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/storage/DatabaseStorage.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/storage/DatabaseStorage.java b/src/main/java/org/traccar/storage/DatabaseStorage.java
index 2b9172153..e4e4f3294 100644
--- a/src/main/java/org/traccar/storage/DatabaseStorage.java
+++ b/src/main/java/org/traccar/storage/DatabaseStorage.java
@@ -324,7 +324,10 @@ public class DatabaseStorage extends Storage {
result.append(" UNION ");
result.append("SELECT DISTINCT ");
- result.append(groupStorageName).append('.').append(outputKey);
+ if (!expandDevices) {
+ result.append(groupStorageName).append('.');
+ }
+ result.append(outputKey);
result.append(" FROM ");
result.append(groupStorageName);