diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 8f12b36083..06ea915f73 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -657,7 +657,7 @@ export const getEventContextBindings = ( * @return {{schema: Object, table: Object}} */ export const getSchemaForDatasourcePlus = (resourceId, options) => { - const isViewV2 = resourceId?.includes("view_ta_") + const isViewV2 = resourceId?.includes("view_") const datasource = isViewV2 ? { type: "viewV2", diff --git a/packages/client/src/stores/dataSource.js b/packages/client/src/stores/dataSource.js index 5124b46fea..2e99a55aa3 100644 --- a/packages/client/src/stores/dataSource.js +++ b/packages/client/src/stores/dataSource.js @@ -81,7 +81,7 @@ export const createDataSourceStore = () => { // Fetch related table IDs from table schema let schema - if (options.invalidateRelationships) { + if (options.invalidateRelationships && !dataSourceId?.includes("view_")) { try { const definition = await API.fetchTableDefinition(dataSourceId) schema = definition?.schema