Allow modifying views with readonly configs (other fields)

This commit is contained in:
Adria Navarro 2024-05-30 14:37:19 +02:00
parent efc9d3399e
commit 326a90a41e
1 changed files with 4 additions and 1 deletions

View File

@ -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)
}