Fixed #28769 -- Replaced 'x if x else y' with 'x or y'.

This commit is contained in:
Дилян Палаузов 2017-11-06 10:23:29 -05:00 committed by Tim Graham
parent 00b93c2b1e
commit c69e4bc691
10 changed files with 20 additions and 27 deletions

View file

@ -606,7 +606,7 @@ class Query:
# Ordering uses the 'rhs' ordering, unless it has none, in which case
# the current ordering is used.
self.order_by = rhs.order_by if rhs.order_by else self.order_by
self.order_by = rhs.order_by or self.order_by
self.extra_order_by = rhs.extra_order_by or self.extra_order_by
def deferred_to_data(self, target, callback):