mirror of
https://github.com/django/django.git
synced 2025-07-28 15:44:20 +00:00
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 in 04518e310d
.
This commit is contained in:
parent
f91e085c30
commit
278881e376
3 changed files with 55 additions and 10 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue