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): |