Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit 3975992

Browse files
authored
migratewizard: Fix fetching jobid from api response (#913)
* migratewizard: Display error and unfreeze form when api call fails * migratewizard: Fix fetching jobid from api response
1 parent e3b4210 commit 3975992

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/views/compute/MigrateWizard.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,15 @@ export default {
153153
hostid: this.selectedHost.id,
154154
virtualmachineid: this.resource.id
155155
}).then(response => {
156+
const jobid = this.selectedHost.requiresStorageMotion ? response.migratevirtualmachinewithvolumeresponse.jobid : response.migratevirtualmachineresponse.jobid
156157
this.$store.dispatch('AddAsyncJob', {
157158
title: `${this.$t('label.migrating')} ${this.resource.name}`,
158-
jobid: response.migratevirtualmachineresponse.jobid,
159+
jobid: jobid,
159160
description: this.resource.name,
160161
status: 'progress'
161162
})
162163
this.$pollJob({
163-
jobId: response.migratevirtualmachineresponse.jobid,
164+
jobId: jobid,
164165
successMessage: `${this.$t('message.success.migrating')} ${this.resource.name}`,
165166
successMethod: () => {
166167
this.$parent.$parent.close()

0 commit comments

Comments
 (0)