Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (sftp): Fix initial value in case of private key

Rostislav Dugin9853ac425a51
diff --git a/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx
index f20df064..a9d20f28 100644
--- a/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx
+++ b/frontend/src/features/storages/ui/edit/storages/EditSFTPStorageComponent.tsx
@@ -14,7 +14,7 @@ export function EditSFTPStorageComponent({ storage, setStorage, setUnsaved }: Pr
const hasAdvancedValues = !!storage?.sftpStorage?.skipHostKeyVerify;
const [showAdvanced, setShowAdvanced] = useState(hasAdvancedValues);
- const initialAuthMethod = storage?.sftpStorage?.privateKey !== undefined ? 'privateKey' : 'password';
+ const initialAuthMethod = storage?.sftpStorage?.privateKey ? 'privateKey' : 'password';
const [authMethod, setAuthMethod] = useState<'password' | 'privateKey'>(initialAuthMethod);
return (