Ticket #9358: 9231-dates-sorting.diff
File 9231-dates-sorting.diff, 527 bytes (added by , 16 years ago) |
---|
-
django/db/models/sql/subqueries.py
diff --git a/django/db/models/sql/subqueries.py b/django/db/models/sql/subqueries.py index 39ef439..bb60010 100644
a b class DateQuery(Query): 397 397 self.select_related = False # See #7097. 398 398 self.extra_select = {} 399 399 self.distinct = True 400 self.order_by = order == 'ASC' and [ 1] or [-1]400 self.order_by = order == 'ASC' and [field.name] or ['-%s' % field.name] 401 401 402 402 class CountQuery(Query): 403 403 """