mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #31657 -- Fixed ordering by attnames of self-referential ForeignKeys.
This commit is contained in:
committed by
Mariusz Felisiak
parent
c1f7de8acc
commit
037a624120
@@ -353,6 +353,11 @@ class OrderingTests(TestCase):
|
||||
['Article 2', 'Article 1'],
|
||||
attrgetter('headline'),
|
||||
)
|
||||
self.assertQuerysetEqual(
|
||||
Article.objects.filter(author__isnull=False).order_by('author__editor_id'),
|
||||
['Article 1', 'Article 2'],
|
||||
attrgetter('headline'),
|
||||
)
|
||||
|
||||
def test_order_by_f_expression(self):
|
||||
self.assertQuerysetEqual(
|
||||
|
||||
Reference in New Issue
Block a user