Skip to content

Commit

Permalink
Patch correct platform type
Browse files Browse the repository at this point in the history
  • Loading branch information
ammont82 committed Jul 24, 2023
1 parent 48c8189 commit 977dc9a
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,15 @@ const ClusterDetailsForm = (props: ClusterDetailsFormProps) => {
const handleSubmit = React.useCallback(
async (values: OcmClusterDetailsValues) => {
if (cluster) {
const platform = values.platform === 'none' ? 'baremetal' : values.platform;
const resetPlatform = cluster.userManagedNetworking ? 'baremetal' : platform;

let resetPlatform = values.platform;
const clusterPlatform = cluster.platform?.type;
if (
values.platform === 'none' &&
clusterPlatform !== 'none' &&
clusterPlatform !== 'baremetal'
) {
resetPlatform = 'baremetal';
}
const params = ClusterDetailsService.getClusterUpdateParams(values, resetPlatform);
await handleClusterUpdate(cluster.id, params);
await handleCustomManifestsChange(cluster.id, clusterWizardContext.addCustomManifests);
Expand Down

0 comments on commit 977dc9a

Please sign in to comment.