quick and dirty fix until introduction of CWEntityManager
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Aug 2009 13:08:27 +0200
changeset 2831 ddde6cf856a1
parent 2830 b0b26b029d08
child 2832 7fb67c54ffb9
child 2838 107421e426de
quick and dirty fix until introduction of CWEntityManager
entity.py
--- a/entity.py	Thu Aug 13 13:07:46 2009 +0200
+++ b/entity.py	Thu Aug 13 13:08:27 2009 +0200
@@ -157,7 +157,8 @@
                     continue
                 if card == '?':
                     restrictions[-1] += '?' # left outer join if not mandatory
-                destcls = cls.vreg['etypes'].etype_class(desttype)
+                # XXX user.req.vreg iiiirk
+                destcls = user.req.vreg['etypes'].etype_class(desttype)
                 destcls._fetch_restrictions(var, varmaker, destcls.fetch_attrs,
                                             selection, orderby, restrictions,
                                             user, ordermethod, visited=visited)