fix: avoid setting filename prop for non sqlite connection config

This commit is contained in:
Pranav C
2024-08-29 10:28:54 +00:00
parent 65f657be88
commit ceea6b4304

View File

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