From 326a90a41e550b9859933fc7531b547efd06c622 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 30 May 2024 14:37:19 +0200 Subject: [PATCH] Allow modifying views with readonly configs (other fields) --- packages/server/src/sdk/app/views/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 150fe2c678..292d643648 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -54,7 +54,10 @@ async function guardViewSchema( } if (viewSchema[field].readonly) { - if (!(await features.isViewReadonlyColumnsEnabled())) { + if ( + !(await features.isViewReadonlyColumnsEnabled()) && + !(tableSchemaField as ViewUIFieldMetadata).readonly + ) { throw new HTTPError(`Readonly fields are not enabled`, 400) }