From 9c29c360431d2f7a197e224ed587925675b6bcf7 Mon Sep 17 00:00:00 2001 From: Edward Valley Date: Wed, 17 Jul 2019 20:22:32 -0400 Subject: Changes after first review --- src/main/java/org/traccar/database/DeviceManager.java | 13 ++++++------- 1 file 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 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; -- cgit v1.2.3