Fix find order_by bug for descending order

This commit is contained in:
John Lee 2014-03-07 17:07:38 -08:00
parent 818de0d7db
commit 798e92e472

View File

@ -321,7 +321,7 @@ class Table(object):
self._check_dropped()
if not isinstance(order_by, (list, tuple)):
order_by = [order_by]
order_by = [o for o in order_by if o in self.table.columns]
order_by = [o for o in order_by if (o.startswith('-') and o[1:] or o) in self.table.columns]
order_by = [self._args_to_order_by(o) for o in order_by]
args = self._args_to_clause(_filter)