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 , 4 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 4 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 4 years ago
Triage Stage: | Accepted → Unreviewed |
---|
comment:4 by , 4 years ago
Summary: | Fail on SQL generation for ExclusionConstraint with complex expression → ExclusionConstraint crashes on expression with params. |
---|---|
Triage Stage: | Unreviewed → Accepted |
Thanks for the report.
Reproduced at d534b5734f5087cb0b9a20bd7cd28bfda93c71b0.
Note:
See TracTickets
for help on using tickets.
You shouldn't accept your own tickets.