diff options
author | nativbarak <nativ@globekeeper.com> | 2018-02-07 09:56:41 +0200 |
---|---|---|
committer | nativbarak <nativ@globekeeper.com> | 2018-02-07 09:56:41 +0200 |
commit | 3a0a269dca63dacc1199cc738aacdfb2c2ecc7bf (patch) | |
tree | d2ff689ee646385729dea19278084b2a1531cf4a /src | |
parent | da1f01f9367e882b90b495cfae9b67d71e0cf1bb (diff) | |
download | traccar-server-3a0a269dca63dacc1199cc738aacdfb2c2ecc7bf.tar.gz traccar-server-3a0a269dca63dacc1199cc738aacdfb2c2ecc7bf.tar.bz2 traccar-server-3a0a269dca63dacc1199cc738aacdfb2c2ecc7bf.zip |
remove unnecasseray checks
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/WebDataHandler.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/org/traccar/WebDataHandler.java b/src/org/traccar/WebDataHandler.java index 5a0aab3e4..f7a7222d8 100644 --- a/src/org/traccar/WebDataHandler.java +++ b/src/org/traccar/WebDataHandler.java @@ -146,17 +146,10 @@ public class WebDataHandler extends BaseDataHandler { protected String prepareJsonPayload(Position position) { Map<String, Object> data = new HashMap<>(); + Device device = Context.getIdentityManager().getById(position.getDeviceId()); - if (position != null) { - data.put(KEY_POSITION, position); - } - - if (position.getDeviceId() != 0) { - Device device = Context.getIdentityManager().getById(position.getDeviceId()); - if (device != null) { - data.put(KEY_DEVICE, device); - } - } + data.put(KEY_POSITION, position); + data.put(KEY_DEVICE, device); try { return Context.getObjectMapper().writeValueAsString(data); |