Fix tests.

This commit is contained in:
Sam Rose 2024-07-19 15:46:48 +01:00
parent 1704d0e69f
commit 41bc9b87c3
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

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