mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[4.2.x] Fixed #34346 -- Ordered selected expressions by position.
Used the same approach as for #34176 by using selected expressions position to prevent ambiguous aliases in collisions. Thanks henribru for the report. Regression in04518e310d. Backport of278881e376from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
312d0f88b4
commit
aab25a69dd
@@ -465,10 +465,9 @@ class TestQuerying(PostgreSQLTestCase):
|
||||
{"field__0": 20, "arrayagg": [self.objs[3].pk]},
|
||||
],
|
||||
)
|
||||
alias = connection.ops.quote_name("field__0")
|
||||
sql = ctx[0]["sql"]
|
||||
self.assertIn("GROUP BY 1", sql)
|
||||
self.assertIn(f"ORDER BY {alias}", sql)
|
||||
self.assertIn("ORDER BY 1", sql)
|
||||
|
||||
def test_index(self):
|
||||
self.assertSequenceEqual(
|
||||
|
||||
Reference in New Issue
Block a user