Skip to content

Commit 9dd75f2

Browse files
committed
Fix race in fetchZones
1 parent 0df7f8d commit 9dd75f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ui/src/components/view/DeployVMFromBackup.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,15 +1554,15 @@ export default {
15541554
})
15551555
},
15561556
async fetchData () {
1557-
if (this.dataPreFill.zoneid) {
1558-
this.fetchDataByZone(this.dataPreFill.zoneid)
1559-
}
1560-
this.fetchZones(null, null)
1557+
await this.fetchZones(null, null)
15611558
_.each(this.params, (param, name) => {
15621559
if (param.isLoad) {
15631560
this.fetchOptions(param, name)
15641561
}
15651562
})
1563+
if (this.dataPreFill.zoneid) {
1564+
this.selectPreFillZone(this.dataPreFill.zoneid)
1565+
}
15661566
this.fetchBootTypes()
15671567
this.fetchBootModes()
15681568
this.fetchInstaceGroups()
@@ -1591,9 +1591,8 @@ export default {
15911591
}
15921592
this.showOverrideDiskOfferingOption = val
15931593
},
1594-
async fetchDataByZone (zoneId) {
1594+
async selectPreFillZone (zoneId) {
15951595
this.fillValue('zoneid')
1596-
this.options.zones = await this.fetchZones(zoneId)
15971596
this.onSelectZoneId(zoneId)
15981597
},
15991598
fetchBootTypes () {

0 commit comments

Comments
 (0)