mirror of
https://github.com/django/django.git
synced 2025-07-27 23:24:14 +00:00
Fixed #17429 -- Ensured that Meta.ordering=None
works the same if it were an empty list. Thanks to self[at]dicos[dot]ru for the report and to bigkevmcd for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
31b1cbc623
commit
c93933441e
2 changed files with 14 additions and 1 deletions
|
@ -347,7 +347,9 @@ class SQLCompiler(object):
|
|||
elif not self.query.default_ordering:
|
||||
ordering = self.query.order_by
|
||||
else:
|
||||
ordering = self.query.order_by or self.query.model._meta.ordering
|
||||
ordering = (self.query.order_by
|
||||
or self.query.model._meta.ordering
|
||||
or [])
|
||||
qn = self.quote_name_unless_alias
|
||||
qn2 = self.connection.ops.quote_name
|
||||
distinct = self.query.distinct
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue