Browse Source

Merge pull request #9379 from nocodb/nc-fix/test-connection

fix: Test connection related bugs
pull/9381/head
Pranav C 3 months ago committed by GitHub
parent
commit
cc29c29101
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      packages/nc-gui/components/workspace/integrations/forms/EditOrAddDatabase.vue
  2. 2
      packages/nocodb-sdk/src/lib/connectionConfigUtils.ts

8
packages/nc-gui/components/workspace/integrations/forms/EditOrAddDatabase.vue

@ -359,9 +359,13 @@ const handleImportURL = async () => {
formState.value.dataSource.client = connectionConfig.client formState.value.dataSource.client = connectionConfig.client
formState.value.dataSource.connection = { formState.value.dataSource.connection = {
...connectionConfig.connection, ...connectionConfig.connection,
connection: { }
// set filename only for sqlite connection
if (connectionConfig.client === ClientType.SQLITE) {
formState.value.dataSource.connection.connection = {
filename: connectionConfig?.connection?.filename || '', filename: connectionConfig?.connection?.filename || '',
}, }
} }
} else { } else {
message.error(t('msg.error.invalidURL')) message.error(t('msg.error.invalidURL'))

2
packages/nocodb-sdk/src/lib/connectionConfigUtils.ts

@ -2,7 +2,7 @@ import { SSLUsage } from '~/lib/enums';
export const validateAndExtractSSLProp = ( export const validateAndExtractSSLProp = (
connectionConfig: any, connectionConfig: any,
sslUse: SSLUsage = SSLUsage.No, sslUse: SSLUsage,
client: string client: string
) => { ) => {
if ('ssl' in connectionConfig && connectionConfig.ssl) { if ('ssl' in connectionConfig && connectionConfig.ssl) {

Loading…
Cancel
Save