Fix tests

This commit is contained in:
Adria Navarro 2024-05-14 18:22:55 +02:00
parent 6c1b3a0d2d
commit 74ac68d72d
2 changed files with 7 additions and 6 deletions

View File

@ -164,11 +164,12 @@ export async function inputProcessing(
delete clonedRow[key].url
}
} else if (
field.type === FieldType.BB_REFERENCE_SINGLE ||
helpers.schema.isDeprecatedSingleUserColumn(field)
value &&
(field.type === FieldType.BB_REFERENCE_SINGLE ||
helpers.schema.isDeprecatedSingleUserColumn(field))
) {
clonedRow[key] = await processInputBBReference(value, field.subtype)
} else if (field.type === FieldType.BB_REFERENCE) {
} else if (value && field.type === FieldType.BB_REFERENCE) {
clonedRow[key] = await processInputBBReferences(value, field.subtype)
}
}

View File

@ -102,7 +102,7 @@ describe("rowProcessor - inputProcessing", () => {
name: "user",
constraints: {
presence: true,
type: "string",
type: "array",
},
},
},
@ -154,7 +154,7 @@ describe("rowProcessor - inputProcessing", () => {
name: "user",
constraints: {
presence: false,
type: "string",
type: "array",
},
},
},
@ -196,7 +196,7 @@ describe("rowProcessor - inputProcessing", () => {
name: "user",
constraints: {
presence: false,
type: "string",
type: "array",
},
},
},