mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #30557 -- Fixed crash of ordering by ptr fields when Meta.ordering contains F() expressions.
Thanks Can Sarıgöl for the report.
Follow up to 8c5f9906c5.
This commit is contained in:
@@ -33,7 +33,7 @@ class Article(models.Model):
|
||||
class Meta:
|
||||
ordering = (
|
||||
'-pub_date',
|
||||
'headline',
|
||||
models.F('headline'),
|
||||
models.F('author__name').asc(),
|
||||
OrderBy(models.F('second_author__name')),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user