@@ -1085,6 +1085,11 @@ export default {
10851085 }
10861086 getAPI (' listStoragePools' , params).then (json => {
10871087 this .storagePoolsForConversion = json .liststoragepoolsresponse .storagepool || []
1088+ // Keep selected pool state aligned when the value is auto-populated by v-model.
1089+ if (this .form .convertstoragepoolid ) {
1090+ const poolExists = this .storagePoolsForConversion .some (pool => pool .id === this .form .convertstoragepoolid )
1091+ this .selectedStoragePoolForConversion = poolExists ? this .form .convertstoragepoolid : null
1092+ }
10881093 })
10891094 } else if (this .selectedStorageOptionForConversion === ' local' ) {
10901095 const kvmHost = this .kvmHostsForConversion .filter (x => x .id === this .selectedKvmHostForConversion )[0 ]
@@ -1094,6 +1099,10 @@ export default {
10941099 status: ' Up'
10951100 }).then (json => {
10961101 this .storagePoolsForConversion = json .liststoragepoolsresponse .storagepool || []
1102+ if (this .form .convertstoragepoolid ) {
1103+ const poolExists = this .storagePoolsForConversion .some (pool => pool .id === this .form .convertstoragepoolid )
1104+ this .selectedStoragePoolForConversion = poolExists ? this .form .convertstoragepoolid : null
1105+ }
10971106 })
10981107 }
10991108 },
@@ -1290,8 +1299,9 @@ export default {
12901299 if (this .selectedKvmHostForImporting ) {
12911300 params .importinstancehostid = this .selectedKvmHostForImporting
12921301 }
1293- if (this .selectedStoragePoolForConversion ) {
1294- params .convertinstancepoolid = this .selectedStoragePoolForConversion
1302+ const selectedPoolForConversion = values .convertstoragepoolid || this .selectedStoragePoolForConversion
1303+ if (selectedPoolForConversion) {
1304+ params .convertinstancepoolid = selectedPoolForConversion
12951305 }
12961306 if (this .vmwareToKvmExtraParams ) {
12971307 params .extraparams = this .vmwareToKvmExtraParams
0 commit comments