fix: machine loader device_id column ambiguous

This commit is contained in:
Taranto 2023-08-09 16:35:38 +01:00
parent a5943695f3
commit 03bef89eb6

View file

@ -139,7 +139,7 @@ function getMachineName (machineId) {
}
function getMachine (machineId, config) {
const sql = `${MACHINE_WITH_CALCULATED_FIELD_SQL} WHERE device_id = $1`
const sql = `${MACHINE_WITH_CALCULATED_FIELD_SQL} WHERE d.device_id = $1`
const queryMachine = db.oneOrNone(sql, [machineId]).then(r => {
if (r === null) throw new ApolloError('Resource doesn\'t exist', 'NOT_FOUND')