mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-18 10:46:22 +00:00
Properly set device name, and set undefined arguments to setConfig as null
This commit is contained in:
parent
d011e545c5
commit
7bb3931f2c
@ -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…
Reference in New Issue
Block a user