aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <atananaev@lyft.com>2020-12-28 13:57:29 -0800
committerAnton Tananaev <atananaev@lyft.com>2020-12-28 13:57:29 -0800
commit76ba984121f8eb72ada824bcaa1800831ceabdf2 (patch)
treec4fe97810c0a5666314ba9f4d64be977edddac25 /src/main
parent6bb57ebef4371459f8912a6d264d69431815d1f6 (diff)
downloadtrackermap-server-76ba984121f8eb72ada824bcaa1800831ceabdf2.tar.gz
trackermap-server-76ba984121f8eb72ada824bcaa1800831ceabdf2.tar.bz2
trackermap-server-76ba984121f8eb72ada824bcaa1800831ceabdf2.zip
Always lookup group attributes
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/database/DeviceManager.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/database/DeviceManager.java b/src/main/java/org/traccar/database/DeviceManager.java
index e621e6058..c78526b3e 100644
--- a/src/main/java/org/traccar/database/DeviceManager.java
+++ b/src/main/java/org/traccar/database/DeviceManager.java
@@ -45,7 +45,6 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity
private final Config config;
private final long dataRefreshDelay;
- private final boolean lookupGroupsAttribute;
private Map<String, Device> devicesByUniqueId;
private Map<String, Device> devicesByPhone;
@@ -70,7 +69,6 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity
writeUnlock();
}
dataRefreshDelay = config.getLong("database.refreshDelay", DEFAULT_REFRESH_DELAY) * 1000;
- lookupGroupsAttribute = config.getBoolean("deviceManager.lookupGroupsAttribute");
refreshLastPositions();
}
@@ -428,7 +426,7 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity
Device device = getById(deviceId);
if (device != null) {
result = device.getAttributes().get(attributeName);
- if (result == null && lookupGroupsAttribute) {
+ if (result == null) {
long groupId = device.getGroupId();
while (groupId != 0) {
Group group = Context.getGroupsManager().getById(groupId);