Skip to content

Commit

Permalink
Fix for Storage creation failed with 'Cannot read "protocol" of null'
Browse files Browse the repository at this point in the history
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1910483

Signed-off-by: Gowtham Shanmugasundaram <gshanmug@redhat.com>
  • Loading branch information
Gowtham Shanmugasundaram authored and GowthamShanmugam committed Jan 6, 2021
1 parent 83c8935 commit b60f62e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,17 @@ export const EncryptionFormGroup: React.FC<EncryptionFormGroupProps> = ({
}, [encryption.clusterWide, encryption.storageClass, encryptionChecked]);

const toggleEncryption = (checked: boolean) => {
setEncryptionDispatch(ActionType.SET_ENCRYPTION, mode, dispatch, {
const payload = {
...encryption,
clusterWide: checked,
});
setEncryptionChecked(checked);
};
if (!checked) {
payload.advanced = false;
payload.storageClass = false;
setEncryptionDispatch(ActionType.CLEAR_KMS_STATE, mode, dispatch);
}
setEncryptionDispatch(ActionType.SET_ENCRYPTION, mode, dispatch, payload);
setEncryptionChecked(checked);
};

const toggleClusterWideEncryption = (checked: boolean) => {
Expand Down

0 comments on commit b60f62e

Please sign in to comment.