fixed bug in orderby when it is a list

This commit is contained in:
mdipierro
2015-05-28 13:59:03 -05:00
parent 1e66fa3a93
commit 926de90ee4
+1 -1
View File
@@ -2071,7 +2071,7 @@ class SQLFORM(FORM):
if not orderby:
orderby = field_id
elif isinstance(orderby, list):
orderby = map(lambda a,b: a|b, orderby)
orderby = reduce(lambda a,b: a|b, orderby)
elif isinstance(orderby, Field) and orderby is not field_id:
# here we're with an ASC order on a field stored as orderby
orderby = orderby | field_id