From b53f61228cfbf0e46778490e5eb4962be77a5be7 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 15 Aug 2023 15:47:26 +0100 Subject: [PATCH] Throw error when attempting to fetch an individual row from a view --- .../src/components/grid/stores/viewV2.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/frontend-core/src/components/grid/stores/viewV2.js b/packages/frontend-core/src/components/grid/stores/viewV2.js index 5bf27b5b56..b24bf56c98 100644 --- a/packages/frontend-core/src/components/grid/stores/viewV2.js +++ b/packages/frontend-core/src/components/grid/stores/viewV2.js @@ -43,19 +43,8 @@ export const createActions = context => { }) } - // TODO: update in future. We can't depend on having table read access. - const getRow = async id => { - const res = await API.searchTable({ - tableId: get(datasource).tableId, - limit: 1, - query: { - equal: { - _id: id, - }, - }, - paginate: false, - }) - return res?.rows?.[0] + const getRow = () => { + throw "Views don't support fetching individual rows" } const isDatasourceValid = datasource => {