This commit is contained in:
Josh Harvey 2016-10-24 23:05:04 +03:00
parent a49fac6cc8
commit bb1e952e39
5 changed files with 4 additions and 5 deletions

View file

@ -261,7 +261,8 @@ exports.cartridgeCounts = function cartridgeCounts (deviceId) {
return db.oneOrNone(sql, [deviceId, true])
.then(row => {
const counts = row ? [row.count1, row.count2] : [0, 0]
return {id: row.id, counts: counts}
const id = row ? row.id : 0
return {id, counts}
})
}