Changes between Initial Version and Version 1 of Ticket #28211


Ignore:
Timestamp:
May 16, 2017, 5:56:45 AM (8 years ago)
Author:
Tom Forbes
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28211 – Description

    initial v1  
    1111It is also quite a common pattern to do:
    1212
    13 ```
     13{{{
    1414filters = Q()
    1515if condition:
     
    1717if other_condition:
    1818   filters |= Q(y=2)
    19 ```
     19}}}
     20
    2021
    2122And with the current implementation it will always produce a query that assumes `filters` is a valid `OR`. Django should/could be more intelligent and detect if there is only one `OR` condition, and reduce it.
Back to Top