fix: machine loader device_id column ambiguous
This commit is contained in:
parent
a5943695f3
commit
03bef89eb6
1 changed files with 1 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ function getMachineName (machineId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMachine (machineId, config) {
|
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 => {
|
const queryMachine = db.oneOrNone(sql, [machineId]).then(r => {
|
||||||
if (r === null) throw new ApolloError('Resource doesn\'t exist', 'NOT_FOUND')
|
if (r === null) throw new ApolloError('Resource doesn\'t exist', 'NOT_FOUND')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue