Skip to content
Snippets Groups Projects
Commit d55c1dd5 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Retrieve selected models when loading the process configuration view

parent 06e72217
No related branches found
No related tags found
1 merge request!1408Retrieve selected models when loading the process configuration view
......@@ -94,21 +94,23 @@ export default {
}
},
methods: {
...mapActions('model', ['getModelVersion', 'listModels'])
...mapActions('model', ['getModelVersion', 'retrieveModel'])
},
watch: {
selectedModelVersionId: {
immediate: true,
async handler () {
if (this.selectedModelVersionId && !this.modelVersions[this.selectedModelVersionId]) {
handler (newValue) {
if (newValue && !this.modelVersions[newValue]) {
// The model version might not be in store yet
await this.getModelVersion(this.selectedModelVersionId)
if (!this.selectedModel) {
// The model might not be in store yet
await this.listModels({ page: 1 })
}
this.getModelVersion(newValue)
}
}
},
modelVersion: {
immediate: true,
handler (newValue) {
if (newValue?.model_id && !this.models[newValue.model_id]) this.retrieveModel(newValue.model_id)
}
}
}
}
......
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