diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-04 18:47:52 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-04 18:47:52 +1300 |
commit | 344799f3be95dded17bf068c42c0e8776e82aa3f (patch) | |
tree | 5cac6cbe948dc0b8d920be641f7a0d898eafb69e /web/app/view/StateController.js | |
parent | ef19de9ed7b815aef4f3f9640cb9bcc806cf1e41 (diff) | |
download | traccar-server-344799f3be95dded17bf068c42c0e8776e82aa3f.tar.gz traccar-server-344799f3be95dded17bf068c42c0e8776e82aa3f.tar.bz2 traccar-server-344799f3be95dded17bf068c42c0e8776e82aa3f.zip |
Find exact record matches in store
Diffstat (limited to 'web/app/view/StateController.js')
-rw-r--r-- | web/app/view/StateController.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/view/StateController.js b/web/app/view/StateController.js index 29f6a7c6d..819c203c4 100644 --- a/web/app/view/StateController.js +++ b/web/app/view/StateController.js @@ -116,9 +116,9 @@ Ext.define('Traccar.view.StateController', { selectDevice: function (device) { var found; this.deviceId = device.get('id'); - found = Ext.getStore('LatestPositions').query('deviceId', this.deviceId); - if (found.getCount() > 0) { - this.updatePosition(found.first()); + found = Ext.getStore('LatestPositions').findRecord('deviceId', this.deviceId, 0, false, false, true); + if (found) { + this.updatePosition(found); } else { Ext.getStore('Attributes').removeAll(); } |