Skip to content

Commit a51b593

Browse files
authored
backport pr 15814 (#16002)
1 parent 0a5778e commit a51b593

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

shell/models/provisioning.cattle.io.cluster.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,11 @@ export default class ProvCluster extends SteveModel {
381381
}
382382

383383
get mgmtClusterId() {
384-
return this.status?.clusterName;
384+
// when a cluster is created `this` instance isn't immediately updated with `status.clusterName`
385+
// Workaround - Get fresh copy from the store
386+
const pCluster = this.$rootGetters['management/byId'](CAPI.RANCHER_CLUSTER, this.id);
387+
388+
return this.status?.clusterName || pCluster?.status?.clusterName;
385389
}
386390

387391
get mgmt() {

0 commit comments

Comments
 (0)