mirror of
https://github.com/django/django.git
synced 2025-08-25 13:04:36 +00:00
Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last.
This commit is contained in:
parent
6c3104221b
commit
21a3a29dc9
4 changed files with 27 additions and 16 deletions
|
@ -1132,6 +1132,9 @@ class OrderBy(BaseExpression):
|
|||
|
||||
def reverse_ordering(self):
|
||||
self.descending = not self.descending
|
||||
if self.nulls_first or self.nulls_last:
|
||||
self.nulls_first = not self.nulls_first
|
||||
self.nulls_last = not self.nulls_last
|
||||
return self
|
||||
|
||||
def asc(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue