mirror of
https://github.com/django/django.git
synced 2025-01-30 12:09:25 +00:00
d5ce2dd7bc
When the query's model had a self-referential foreign key, the compiler.get_group_by() code incorrectly used the self-referential foreign key's column (for example parent_id) as GROUP BY clause when it should have used the model's primary key column (id). Backport of adc57632bc26cc8fe42bdb6aff463f883214980a from master