1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Respond to PR comments.

This commit is contained in:
Sam Rose 2024-07-19 15:10:02 +01:00
parent 3c18cf7c34
commit 1704d0e69f
No known key found for this signature in database

View file

@ -29,6 +29,7 @@ import sdk from "../../../sdk"
import { jsonFromCsvString } from "../../../utilities/csv"
import { builderSocket } from "../../../websockets"
import { cloneDeep, isEqual } from "lodash"
import { helpers } from "@budibase/shared-core"
function pickApi({ tableId, table }: { tableId?: string; table?: Table }) {
if (table && isExternalTable(table)) {
@ -45,7 +46,7 @@ function checkDefaultFields(table: Table) {
if (!("default" in field) || field.default == null) {
continue
}
if (field.constraints?.presence) {
if (helpers.schema.isRequired(field)) {
throw new HTTPError(
`Cannot make field "${key}" required, it has a default value.`,
400