fix: Give unmanaged target states a source of 'local'

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2018-12-12 13:21:03 +00:00
parent 178e80d92a
commit 5bea0fdc9d
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -351,7 +351,7 @@ module.exports = class DeviceState extends EventEmitter
.then =>
@deviceConfig.setTarget(target.local.config, trx)
.then =>
if localSource
if localSource or not apiEndpoint
@applications.setTarget(target.local.apps, target.dependent, 'local', trx)
else
@applications.setTarget(target.local.apps, target.dependent, apiEndpoint, trx)