Convert object to array when normalising legacy target apps

Change-type: patch
Connects-to: #567
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2018-03-08 15:32:00 +00:00
parent 5320b92c98
commit a150dbf329
No known key found for this signature in database
GPG Key ID: E76D7ACBEE436E12

View File

@ -153,8 +153,9 @@ module.exports = class DeviceState extends EventEmitter
.then =>
console.log('Migrating legacy app volumes')
@applications.getTargetApps()
.map (app) =>
@applications.volumes.createFromLegacy(app.appId)
.then(_.keys)
.map (appId) =>
@applications.volumes.createFromLegacy(appId)
.then =>
@config.set({ legacyAppsPresent: 'false' })