Changes between Initial Version and Version 1 of Ticket #32717, comment 4
- Timestamp:
- May 11, 2021, 12:49:40 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32717, comment 4
initial v1 3 3 One [https://github.com/django/django/blob/205c36b58fed5a1a0ff462593fc61b58189027d8/django/utils/tree.py#L93-L94 the ''optimization''] in `Node.add` strikes again this time for `Lookup` equality as it was introduced in bbf141bcdc31f1324048af9233583a523ac54c94. As we already know [https://code.djangoproject.com/ticket/32632#comment:4 this code is poorly tested] and this issue just uncovered that it's actually flawed as it should also make sure that connectors are matching. 4 4 5 What's happening here is that the query has a `WHERE` tree of the form `(jurisdiction = ' US' OR ...)` and it wrongfully consider that an addition of a `AND jurisdiction = 'US'` is noop because it doesn't compare the connector `AND != OR`. The following patch should address that.5 What's happening here is that the query has a `WHERE` tree of the form `(jurisdiction = 'GB' OR ...)` and it wrongfully consider that an addition of a `AND jurisdiction = 'GB'` is noop because it doesn't compare the connector `AND != OR`. The following patch should address that. 6 6 7 7 {{{#!diff