Respond to PR comments.
This commit is contained in:
parent
3c18cf7c34
commit
1704d0e69f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue