mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 14:13:08 +00:00
Bind db handle to fn variable
During the conversion to typescript, the behaviour of the database handle changed slightly, meaning storing a reference to the models function also requires a bind to be applied too. Change-type: patch Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
parent
857165f625
commit
080fdd3774
@ -61,7 +61,7 @@ module.exports = class DeviceConfig
|
|||||||
return @configBackend
|
return @configBackend
|
||||||
|
|
||||||
setTarget: (target, trx) =>
|
setTarget: (target, trx) =>
|
||||||
db = trx ? @db.models
|
db = trx ? @db.models.bind(@db)
|
||||||
confToUpdate = {
|
confToUpdate = {
|
||||||
targetValues: JSON.stringify(target)
|
targetValues: JSON.stringify(target)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user