UI: Fix hypervisor list after zone validation when registering a template (#6382)

This commit is contained in:
Nicolas Vazquez 2022-05-12 07:17:28 -03:00 committed by GitHub
parent c0176b24ab
commit 8aca2b67f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -722,10 +722,10 @@ export default {
}
this.hyperVisor.opts = []
if (this.zoneError !== '') {
const allZoneExists = value.filter(zone => zone === this.$t('label.all.zone'))
if (allZoneExists.length > 0 && value.length > 1) {
return
}
const arrSelectReset = ['hypervisor', 'format', 'rootDiskControllerType', 'nicAdapterType', 'keyboardType']
this.resetSelect(arrSelectReset)
@ -876,10 +876,8 @@ export default {
return Promise.resolve()
}
const allZoneExists = value.filter(zone => zone === this.$t('label.all.zone'))
this.zoneError = ''
if (allZoneExists.length > 0 && value.length > 1) {
this.zoneError = 'error'
return Promise.reject(this.$t('message.error.zone.combined'))
}