1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #28722 -- Made QuerySet.reverse() affect nulls_first/nulls_last.

This commit is contained in:
Tomer Chachamu
2017-10-18 14:09:45 +01:00
committed by Tim Graham
parent 6c3104221b
commit 21a3a29dc9
4 changed files with 27 additions and 16 deletions

View File

@@ -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):