Don't order by selection translated if order_field is not None

This commit is contained in:
Cédric Krier
2009-01-23 23:51:02 +01:00
parent 9c112e1ade
commit 7f10ef33aa
+2 -1
View File
@@ -3053,7 +3053,8 @@ class ORM(object):
return order_by, tables, tables_args
if field_name in self._columns \
and self._columns[field_name]._type == 'selection':
and self._columns[field_name]._type == 'selection' \
and self._columns[field_name].order_field is None:
selections = self.fields_get(cursor, user, [field_name],
context=context)[field_name]['selection']
if not isinstance(selections, (tuple, list)):