mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #30557 -- Fixed crash of ordering by ptr fields when Meta.ordering contains expressions.
This commit is contained in:
parent
8dd5877f58
commit
8c5f9906c5
3 changed files with 28 additions and 1 deletions
|
@ -54,6 +54,10 @@ class OrderedByFArticle(Article):
|
|||
ordering = (models.F('author').asc(nulls_first=True), 'id')
|
||||
|
||||
|
||||
class ChildArticle(Article):
|
||||
pass
|
||||
|
||||
|
||||
class Reference(models.Model):
|
||||
article = models.ForeignKey(OrderedByAuthorArticle, models.CASCADE)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue