From 76ba984121f8eb72ada824bcaa1800831ceabdf2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 28 Dec 2020 13:57:29 -0800 Subject: Always lookup group attributes --- src/main/java/org/traccar/database/DeviceManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/org/traccar/database') 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 implements Identity private final Config config; private final long dataRefreshDelay; - private final boolean lookupGroupsAttribute; private Map devicesByUniqueId; private Map devicesByPhone; @@ -70,7 +69,6 @@ public class DeviceManager extends BaseObjectManager 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 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); -- cgit v1.2.3