From 0687d7c235e510a841b91f531df666504547d41a Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Wed, 10 Aug 2022 16:27:53 +0100 Subject: [PATCH] fixing wrong filter, excluding just bb_internal --- .../controls/ButtonActionEditor/actions/ExecuteQuery.svelte | 6 ++---- packages/builder/src/constants/backend/index.js | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte index 042a55d761..e19a975ef9 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonActionEditor/actions/ExecuteQuery.svelte @@ -3,7 +3,7 @@ import { datasources, integrations, queries } from "stores/backend" import BindingBuilder from "components/integration/QueryBindingBuilder.svelte" import IntegrationQueryEditor from "components/integration/index.svelte" - import { IntegrationTypes } from "constants/backend" + import { BUDIBASE_DATASOURCE_ID } from "constants/backend" export let parameters export let bindings = [] @@ -14,9 +14,7 @@ ) // Executequery action just works on PostgreSQL and MongoDB datasources $: executeQueryDatasources = $datasources.list.filter( - x => - x.source === IntegrationTypes.POSTGRES || - x.source === IntegrationTypes.MONGODB + x => x._id !== BUDIBASE_DATASOURCE_ID ) function fetchQueryDefinition(query) { diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index d8d09d592f..28ce35d9f7 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -163,6 +163,8 @@ export const SWITCHABLE_TYPES = [ ...ALLOWABLE_NUMBER_TYPES, ] +export const BUDIBASE_DATASOURCE_ID = "bb_internal" + export const IntegrationTypes = { POSTGRES: "POSTGRES", MONGODB: "MONGODB",