Changes between Initial Version and Version 1 of Ticket #28211
- Timestamp:
- May 16, 2017, 5:56:45 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28211 – Description
initial v1 11 11 It is also quite a common pattern to do: 12 12 13 ``` 13 {{{ 14 14 filters = Q() 15 15 if condition: … … 17 17 if other_condition: 18 18 filters |= Q(y=2) 19 ``` 19 }}} 20 20 21 21 22 And 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.