Fix tests.
This commit is contained in:
parent
1704d0e69f
commit
41bc9b87c3
|
@ -46,7 +46,7 @@ function checkDefaultFields(table: Table) {
|
||||||
if (!("default" in field) || field.default == null) {
|
if (!("default" in field) || field.default == null) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (helpers.schema.isRequired(field)) {
|
if (helpers.schema.isRequired(field.constraints)) {
|
||||||
throw new HTTPError(
|
throw new HTTPError(
|
||||||
`Cannot make field "${key}" required, it has a default value.`,
|
`Cannot make field "${key}" required, it has a default value.`,
|
||||||
400
|
400
|
||||||
|
|
Loading…
Reference in New Issue