mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #14357 -- Deprecated Meta.ordering affecting GROUP BY queries.
Thanks Ramiro Morales for contributing to the patch.
This commit is contained in:
committed by
Tim Graham
parent
c52ecbda61
commit
1b1f64ee5a
@@ -1156,7 +1156,7 @@ class Queries1Tests(TestCase):
|
||||
def test_ticket_20250(self):
|
||||
# A negated Q along with an annotated queryset failed in Django 1.4
|
||||
qs = Author.objects.annotate(Count('item'))
|
||||
qs = qs.filter(~Q(extra__value=0))
|
||||
qs = qs.filter(~Q(extra__value=0)).order_by('name')
|
||||
|
||||
self.assertIn('SELECT', str(qs.query))
|
||||
self.assertQuerysetEqual(
|
||||
|
||||
Reference in New Issue
Block a user