entity.py
branchstable
changeset 6258 9b5c008267b0
parent 6124 c5900230809b
child 6279 42079f752a9c
child 6307 c07763c59fcb
equal deleted inserted replaced
6257:7eb5f1aed728 6258:9b5c008267b0
   221                 # XXX user._cw.vreg iiiirk
   221                 # XXX user._cw.vreg iiiirk
   222                 destcls = user._cw.vreg['etypes'].etype_class(desttype)
   222                 destcls = user._cw.vreg['etypes'].etype_class(desttype)
   223                 destcls._fetch_restrictions(var, varmaker, destcls.fetch_attrs,
   223                 destcls._fetch_restrictions(var, varmaker, destcls.fetch_attrs,
   224                                             selection, orderby, restrictions,
   224                                             selection, orderby, restrictions,
   225                                             user, ordermethod, visited=visited)
   225                                             user, ordermethod, visited=visited)
   226             orderterm = getattr(cls, ordermethod)(attr, var)
   226             if ordermethod is not None:
   227             if orderterm:
   227                 orderterm = getattr(cls, ordermethod)(attr, var)
   228                 orderby.append(orderterm)
   228                 if orderterm:
       
   229                     orderby.append(orderterm)
   229         return selection, orderby, restrictions
   230         return selection, orderby, restrictions
   230 
   231 
   231     @classmethod
   232     @classmethod
   232     @cached
   233     @cached
   233     def _rest_attr_info(cls):
   234     def _rest_attr_info(cls):