mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-06 02:48:13 +00:00
Merge pull request #317 from resin-io/fix-set-device-name
Properly set device name, and set undefined arguments to setConfig as null
This commit is contained in:
commit
fece945b54
@ -1,3 +1,5 @@
|
||||
* Properly set device name, and set undefined arguments to setConfig as null [Pablo]
|
||||
|
||||
# v2.6.2
|
||||
|
||||
* Updated knex to ~0.12.3
|
||||
|
@ -594,7 +594,7 @@ application.update = update = (force) ->
|
||||
.then ({ local, dependent }) ->
|
||||
proxyvisor.fetchAndSetTargetsForDependentApps(dependent, fetch, apiKey)
|
||||
.then ->
|
||||
utils.setConfig('name', deviceName) if local.name != deviceName
|
||||
utils.setConfig('name', local.name) if local.name != deviceName
|
||||
.then ->
|
||||
parseEnvAndFormatRemoteApps(local.apps, uuid, apiKey)
|
||||
.then (remoteApps) ->
|
||||
|
@ -150,7 +150,7 @@ exports.getConfig = getConfig = (key) ->
|
||||
.then ([ conf ]) ->
|
||||
return conf?.value
|
||||
|
||||
exports.setConfig = (key, value) ->
|
||||
exports.setConfig = (key, value = null) ->
|
||||
knex('config').update({ value }).where({ key })
|
||||
.then (n) ->
|
||||
knex('config').insert({ key, value }) if n == 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user