--- a/entity.py Tue Sep 14 08:48:44 2010 +0200
+++ b/entity.py Thu Sep 16 18:56:35 2010 +0200
@@ -222,9 +222,10 @@
destcls._fetch_restrictions(var, varmaker, destcls.fetch_attrs,
selection, orderby, restrictions,
user, ordermethod, visited=visited)
- orderterm = getattr(cls, ordermethod)(attr, var)
- if orderterm:
- orderby.append(orderterm)
+ if ordermethod is not None:
+ orderterm = getattr(cls, ordermethod)(attr, var)
+ if orderterm:
+ orderby.append(orderterm)
return selection, orderby, restrictions
@classmethod