diff --git a/ui/src/store/modules/user.js b/ui/src/store/modules/user.js index 6113f3ed9406..15712986ad62 100644 --- a/ui/src/store/modules/user.js +++ b/ui/src/store/modules/user.js @@ -532,14 +532,16 @@ const user = { reject(error) }) - api('listConfigurations', { name: 'hypervisor.custom.display.name' }).then(json => { - if (json.listconfigurationsresponse.configuration !== null) { - const config = json.listconfigurationsresponse.configuration[0] - commit('SET_CUSTOM_HYPERVISOR_NAME', config.value) - } - }).catch(error => { - reject(error) - }) + if ('listConfigurations' in store.getters.apis) { + api('listConfigurations', { name: 'hypervisor.custom.display.name' }).then(json => { + if (json.listconfigurationsresponse.configuration !== null) { + const config = json.listconfigurationsresponse.configuration[0] + commit('SET_CUSTOM_HYPERVISOR_NAME', config.value) + } + }).catch(error => { + reject(error) + }) + } }) }, UpdateConfiguration ({ commit }) { diff --git a/ui/src/views/image/RegisterOrUploadTemplate.vue b/ui/src/views/image/RegisterOrUploadTemplate.vue index c3f812773be5..76df7b246aa1 100644 --- a/ui/src/views/image/RegisterOrUploadTemplate.vue +++ b/ui/src/views/image/RegisterOrUploadTemplate.vue @@ -646,6 +646,9 @@ export default { }) }, fetchCustomHypervisorName () { + if (!('listConfigurations' in this.$store.getters.apis)) { + return + } const params = { name: 'hypervisor.custom.display.name' }