mirror of
https://github.com/django/django.git
synced 2025-10-30 09:06:13 +00:00
[3.1.x] Fixed #31657 -- Fixed ordering by attnames of self-referential ForeignKeys.
Backport of 037a624120 from master
This commit is contained in:
committed by
Mariusz Felisiak
parent
bdfad57319
commit
4385ef0119
@@ -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