Fix invalid

This commit is contained in:
Adria Navarro 2024-08-02 13:14:33 +02:00
parent cd1a7699b2
commit e8e4f064a5
1 changed files with 26 additions and 21 deletions

View File

@ -96,6 +96,7 @@ export function validate(
return
} else if (
[FieldType.STRING].includes(columnType) &&
!columnData &&
helpers.schema.isRequired(constraints)
) {
results.schemaValidation[columnName] = false
@ -215,6 +216,7 @@ function isValidBBReference(
subtype: BBReferenceFieldSubType,
isRequired: boolean
): boolean {
try {
if (type === FieldType.BB_REFERENCE_SINGLE) {
if (!data) {
return !isRequired
@ -239,6 +241,9 @@ function isValidBBReference(
default:
throw utils.unreachable(subtype)
}
} catch {
return false
}
}
function parseJsonExport<T>(value: any) {