This commit is contained in:
Mathias Behrle committed 2008-12-24 14:22:00 +01:00
commit 162cfc9bae
1 file changed
+2 -2
+2 -2
View File
@@ -2922,7 +2922,7 @@ class ORM(object):
'%s.id = %s.%s' % \
(table_name2, obj._table, link_field2)
if table_join2 not in tables:
tables.insert(0, table_join2)
tables.insert(1, table_join2)
return order_by, tables, tables_args
if field_name in self._columns \
@@ -2965,7 +2965,7 @@ class ORM(object):
'%s.id = %s.%s' % \
(table_name, self._table, link_field)
if table_join not in tables:
tables.append(table_join)
tables.insert(0, table_join)
return order_by, tables, tables_args
raise Exception('Error', 'Wrong field name (%s) in order!' \