Skip to content

Commit

Permalink
Address missing access role during cluster creation (#1713)
Browse files Browse the repository at this point in the history
* Fix null value

* update the logic
  • Loading branch information
tylerwowen authored Sep 9, 2024
1 parent 862458a commit 5d6238d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,9 @@ <h4 class="panel-title pull-left">Capacity</h4>
globalNotificationBanner.error = "Replacement timeout must be a number between 5 and 1440 minutes (24 hours)";
return false;
}
var access_role = clusterInfo.configs['access_role'].trim();
if (!access_role) {
globalNotificationBanner.error = "Access Role must be specified";
var access_role = clusterInfo.configs['access_role'] ?? '';
if (access_role.trim().length === 0) {
globalNotificationBanner.error = "Access Role must be specified and cannot be empty";
return false;
}

Expand Down Expand Up @@ -644,7 +644,8 @@ <h4 class="panel-title pull-left">Capacity</h4>
}

let accessRoleObj = this.allUserData.find(({name}) => name === "access_role");
clusterInfo.configs['access_role'] = accessRoleObj.value;
clusterInfo.configs['access_role'] = accessRoleObj?.value;

if (this.validateInput(clusterInfo)) {
//Send request
this.sendRequest(clusterInfo);
Expand Down

0 comments on commit 5d6238d

Please sign in to comment.