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
1 changed files with 2 additions and 1 deletions

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