Opened 4 years ago

Closed 4 years ago

#31902 closed Bug (fixed)

ExclusionConstraint crashes on expression with params.

Reported by: Maxim Petrov Owned by: Maxim Petrov
Component: contrib.postgres Version: dev
Severity: Normal Keywords: ExclusionConstraint
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

When expression for ExclusionConstraint is complex with some parameters Django fails to generate SQL because of wrong params substitution.

ExclusionConstraint(
    name='field_left',
    expressions=[(Left('field', 4), RangeOperators.EQUAL)],
)

Change History (5)

comment:1 by Maxim Petrov, 4 years ago

Owner: set to Maxim Petrov
Status: newassigned

comment:2 by Maxim Petrov, 4 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 4 years ago

Triage Stage: AcceptedUnreviewed

You shouldn't accept your own tickets.

comment:4 by Mariusz Felisiak, 4 years ago

Summary: Fail on SQL generation for ExclusionConstraint with complex expressionExclusionConstraint crashes on expression with params.
Triage Stage: UnreviewedAccepted

Thanks for the report.

Reproduced at d534b5734f5087cb0b9a20bd7cd28bfda93c71b0.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In bf6d077:

Fixed #31902 -- Fixed crash of ExclusionConstraint on expressions with params.

Note: See TracTickets for help on using tickets.
Back to Top