Merge pull request #1826 from RafaelTaranto/fix/load-customer-with-unpaired-machiune

LAM-1393 fix: load customer if lastUsedMachine is unpaired
This commit is contained in:
Rafael Taranto 2025-04-18 13:54:08 +01:00 committed by GitHub
commit 8221701d99

View file

@ -147,7 +147,7 @@ function getMachineNames (config) {
function getMachineName (machineId) { function getMachineName (machineId) {
const sql = 'SELECT name FROM devices WHERE device_id=$1' const sql = 'SELECT name FROM devices WHERE device_id=$1'
return db.oneOrNone(sql, [machineId]) return db.oneOrNone(sql, [machineId])
.then(it => it.name) .then(it => it?.name)
} }
function getMachine (machineId, config) { function getMachine (machineId, config) {