fleetmap-reports 2.0.279 → 2.0.281
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/location-report.js +2 -1
package/package.json
CHANGED
package/src/location-report.js
CHANGED
|
@@ -58,6 +58,7 @@ async function createLocationReportByDriver (from, to, userData, traccar) {
|
|
|
58
58
|
const filtered = batchResults.filter(r => r && r.length)
|
|
59
59
|
console.log(i, '/', devices.length, 'pushing', filtered, batchResults)
|
|
60
60
|
filtered.forEach(r => {
|
|
61
|
+
r = r[0]
|
|
61
62
|
if (r.driver && r.positions) {
|
|
62
63
|
const driver = results.find(d => d.driver && d.driver.id === r.driver.id)
|
|
63
64
|
if (driver) {
|
|
@@ -68,7 +69,7 @@ async function createLocationReportByDriver (from, to, userData, traccar) {
|
|
|
68
69
|
}
|
|
69
70
|
})
|
|
70
71
|
}
|
|
71
|
-
return { drivers: results
|
|
72
|
+
return { drivers: results }
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
async function _getDriverRoute (traccar, from, to, slice, deviceCount, devices, userData, retry = 3) {
|