Skip to content

Commit

Permalink
Fix bug causing e2e tests to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Jun 13, 2024
1 parent 1e4174c commit d653bdf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion shell/edit/provisioning.cattle.io.cluster/rke2.vue
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,22 @@ export default {
* Extension provider where being provisioned by an extension
*/
extensionProvider() {
return this.value?.customProvisionerHelper;
// Note we don't use the model customProvisionerHelper here, as for create it won't be set
// Instead we create from the provider value
const extClass = this.$plugin.getDynamic('provisioner', this.provider);

Check warning on line 424 in shell/edit/provisioning.cattle.io.cluster/rke2.vue

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 6 spaces but found 5
if (extClass) {
return new extClass({
dispatch: this.$store.dispatch,
getters: this.$store.getters,
axios: this.$store.$axios,
$plugin: this.$store.app.$plugin,
$t: this.t,
isCreate: this.isCreate
});
}
return undefined;
},
/**
Expand Down
2 changes: 1 addition & 1 deletion shell/utils/model-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface IModel {
// Function that for a model will return the name of the model extension to use for it
type UseForFunction = (model: any) => string;

// Cache of instantiated model helpers for a given model and helpername
// Cache of instantiated model helpers for a given model and helper name
const modelExtensionCache: {[modelName: string]: {[name: string]: any[]}} = {};

// Cache of instantiated functions to determine if a helper should be used for a given model
Expand Down

0 comments on commit d653bdf

Please sign in to comment.