Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/seed/src/core/plan/constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ export async function checkConstraints(
const sortedConstraints = sortBy(filteredConstraints, (c) => c.fields.length);

for (const constraint of sortedConstraints) {
// We skip the constraint if it contains null values
if (
constraint.fields.some((c) => props.modelData[c] === null) &&
// We skip the constraint if it contains nullish values
if (!constraint.fields.some((c) => props.modelData[c]) &&
// Execpt if the constraint is nullNotDistinct so each null values isn't considered distinct
// from the other null values anymore (maximum one null value is allowed)
!constraint.nullNotDistinct
Expand Down