Changes between Initial Version and Version 1 of Ticket #31377, comment 3


Ignore:
Timestamp:
Mar 18, 2020, 5:14:27 PM (4 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31377, comment 3

    initial v1  
    33We can't change the behavior at the `annotate()` level as it would be backward incompatible and require extra checks every time an additional table is joined.
    44
    5 What needs to be adjust is `sql.Query.set_group_by` to set `alias=None` if `alias is not None and alias in {... set of all column names of tables in alias_map ...}`.
     5What needs to be adjust is `sql.Query.set_group_by` to set `alias=None` if `alias is not None and alias in {... set of all column names of tables in alias_map ...}` before calling `annotation.get_group_by_cols`
    66
    77https://github.com/django/django/blob/fc0fa72ff4cdbf5861a366e31cb8bbacd44da22d/django/db/models/sql/query.py#L1943-L1945
Back to Top