Dataherald / dataherald

Interact with your SQL database, Natural Language to SQL using LLMs
https://dataherald.readthedocs.io/en/latest/
Apache License 2.0
3.35k stars 234 forks source link

Fix PUT /api/v1/database-connections/<conn_id> request #513

Open b-tsao opened 5 months ago

b-tsao commented 5 months ago

The update database-connections api was broken by this PR https://github.com/Dataherald/dataherald/commit/31b88df77d4fdc4356ff232a1c32ecc71cf6a1ff after adding support for schemas

Where the response to the call would be

{"error_code":"invalid_database_connection","message":"'list' object has no attribute 'items'","description":null,"detail":{"alias":"SomeAlias","use_ssh":false,"connection_uri":"gAAAAABmcios2gjJ4CI9-D7jd5vjIuA1fqzC3HGGBQOlxKn4-TGdKSH6X4nmy0onQgJ9WNWJlp79LHwzE0Che12aQ2T7eiV2q3XgI6g4KAc46FBG9keA0SyO-PLpRc4Ewa1y39sSfqCq4S_T05OF_ZVNVWqpHpVJ3rIXQLFsRKyB-YThpJKCyws=","schemas":null,"path_to_credentials_file":null,"llm_api_key":null,"ssh_settings":null,"file_storage":null}}