diff options
author | Edward Valley <ed.valley@yandex.com> | 2019-07-17 20:22:32 -0400 |
---|---|---|
committer | Edward Valley <ed.valley@yandex.com> | 2019-07-17 20:22:32 -0400 |
commit | 9c29c360431d2f7a197e224ed587925675b6bcf7 (patch) | |
tree | 5beac984dac18f819d704a3056ef65ab7e0456c2 | |
parent | f647a3b4af19b9af48c0304ac2bd3e599983cc42 (diff) | |
download | trackermap-server-9c29c360431d2f7a197e224ed587925675b6bcf7.tar.gz trackermap-server-9c29c360431d2f7a197e224ed587925675b6bcf7.tar.bz2 trackermap-server-9c29c360431d2f7a197e224ed587925675b6bcf7.zip |
Changes after first review
-rw-r--r-- | src/main/java/org/traccar/database/DeviceManager.java | 13 |
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; |