Skip to content
Snippets Groups Projects
Verified Commit 8902c3c3 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Allow selecting a template that has worker runs without model versions

parent 22d0c625
No related branches found
No related tags found
1 merge request!1506Allow selecting a template that has worker runs without model versions
......@@ -138,6 +138,7 @@ export default {
applyTitle () {
if (this.canApply) return 'Apply a template to this process'
if (this.hasUnavailableWorkerVersions) return 'This template cannot be applied because it uses one or more worker versions that are not in an Available state'
if (this.hasUnavailableModelVersions) return 'This template cannot be applied because it uses one or more model versions that are not in an Available state'
if (!this.selectedTemplateId) return 'Please select a template to apply'
return null
},
......@@ -162,7 +163,7 @@ export default {
hasUnavailableModelVersions () {
if (this.selectedTemplateId === null) return false
const runs = ensureArray(this.processWorkerRuns[this.selectedTemplateId])
return runs.some(run => run.model_version?.state !== 'available')
return runs.some(run => run.model_version && run.model_version.state !== 'available')
}
},
methods: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment