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 delete clonedRow[key].url
} }
} else if ( } else if (
field.type === FieldType.BB_REFERENCE_SINGLE || value &&
helpers.schema.isDeprecatedSingleUserColumn(field) (field.type === FieldType.BB_REFERENCE_SINGLE ||
helpers.schema.isDeprecatedSingleUserColumn(field))
) { ) {
clonedRow[key] = await processInputBBReference(value, field.subtype) 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) clonedRow[key] = await processInputBBReferences(value, field.subtype)
} }
} }

View File

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