We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9d3d24 commit 307e4e9Copy full SHA for 307e4e9
tests/test_group_by.py
@@ -319,17 +319,13 @@ async def test_group_by_id_with_nested_filter(self):
319
self.assertEqual(set(ret), {(book.id,) for book in self.books1})
320
321
async def test_subquery_group_by_no_alias(self):
322
-
323
query = Author.annotate(
324
book_name=Subquery(
325
Book.all().group_by("name").order_by("name").limit(1).values("name")
326
)
327
328
329
sql = query.sql()
330
331
self.assertIn('GROUP BY "name"', sql)
332
self.assertNotIn('GROUP BY "name" "', sql)
333
334
result = await query.values("name", "book_name")
335
self.assertIsInstance(result, list)
0 commit comments