aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/traccar/database/DeviceManager.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/database/DeviceManager.java b/src/main/java/org/traccar/database/DeviceManager.java
index b12e7f1e5..c14f85608 100644
--- a/src/main/java/org/traccar/database/DeviceManager.java
+++ b/src/main/java/org/traccar/database/DeviceManager.java
@@ -387,13 +387,12 @@ public class DeviceManager extends BaseObjectManager<Device> implements Identity
}
}
}
- if (result == null) {
- if (lookupConfig) {
- result = Context.getConfig().getString(attributeName);
- } else if (lookupServer) {
- Server server = Context.getPermissionsManager().getServer();
- result = server.getAttributes().get(attributeName);
- }
+ if (result == null && lookupConfig) {
+ result = Context.getConfig().getString(attributeName);
+ }
+ if (result == null && lookupServer) {
+ Server server = Context.getPermissionsManager().getServer();
+ result = server.getAttributes().get(attributeName);
}
}
return result;