refs #14280 Merge branch 'origin/14280-query-language'
[arvados-workbench2.git] / src / store / auth / auth-action.ts
index 9aadd5b949b2fe325d38d75bf2a03f4bb60e524b..4ed348751faa6a516eb07bcf3cb2c18688534e01 100644 (file)
@@ -94,9 +94,9 @@ export const openSshKeyCreateDialog = () => dialogActions.OPEN_DIALOG({ id: SSH_
 export const openPublicKeyDialog = (name: string, publicKey: string) =>
     dialogActions.OPEN_DIALOG({ id: SSH_KEY_PUBLIC_KEY_DIALOG, data: { name, publicKey } });
 
-export const openSshKeyAttributesDialog = (index: number) =>
+export const openSshKeyAttributesDialog = (uuid: string) =>
     (dispatch: Dispatch, getState: () => RootState) => {
-        const sshKey = getState().auth.sshKeys[index];
+        const sshKey = getState().auth.sshKeys.find(it => it.uuid === uuid);
         dispatch(dialogActions.OPEN_DIALOG({ id: SSH_KEY_ATTRIBUTES_DIALOG, data: { sshKey } }));
     };