Skip to content

Commit

Permalink
[front] fix: Set config to dsv id when selecting data source (dust-tt…
Browse files Browse the repository at this point in the history
  • Loading branch information
tdraier authored Sep 11, 2024
1 parent 8821762 commit 85d2764
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions front/components/data_source/DataSourcePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ export default function DataSourcePicker({
if (!selectedDataSourceView) {
// If the selected data source view is not found in the list, reset the config
onDataSourcesUpdate([]);
} else if (
currentDataSources[0].data_source_id !==
selectedDataSourceView.dataSource.name
) {
// If the selected data source view is found in the list, but the id is not the dataSource name, update the config
// Switch back to datasource view id when core is fixed
onDataSourcesUpdate([
{
workspace_id: owner.sId,
data_source_id: selectedDataSourceView.dataSource.name,
},
]);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down Expand Up @@ -177,7 +165,7 @@ export default function DataSourcePicker({
onDataSourcesUpdate([
{
workspace_id: owner.sId,
data_source_id: dsv.dataSource.name,
data_source_id: dsv.sId,
},
]);
setSearchFilter("");
Expand Down

0 comments on commit 85d2764

Please sign in to comment.