diff --git a/packages/server/src/api/controllers/table/index.ts b/packages/server/src/api/controllers/table/index.ts index 0cc335590d..3148e54af7 100644 --- a/packages/server/src/api/controllers/table/index.ts +++ b/packages/server/src/api/controllers/table/index.ts @@ -46,7 +46,7 @@ function checkDefaultFields(table: Table) { if (!("default" in field) || field.default == null) { continue } - if (helpers.schema.isRequired(field)) { + if (helpers.schema.isRequired(field.constraints)) { throw new HTTPError( `Cannot make field "${key}" required, it has a default value.`, 400