use ._cw.vreg instead of vreg on appobject classes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 23 Sep 2009 09:34:46 +0200
changeset 3380 3be33dc83d8b
parent 3379 9192ba07890d
child 3381 9ddc8937e16d
use ._cw.vreg instead of vreg on appobject classes
entities/authobjs.py
--- a/entities/authobjs.py	Wed Sep 23 09:34:10 2009 +0200
+++ b/entities/authobjs.py	Wed Sep 23 09:34:46 2009 +0200
@@ -59,12 +59,13 @@
         try:
             # properties stored on the user aren't correctly typed
             # (e.g. all values are unicode string)
-            return self.vreg.typed_value(key, self.properties[key])
+            return self._cw.vreg.typed_value(key, self.properties[key])
         except KeyError:
             pass
         except ValueError:
-            self.warning('incorrect value for eproperty %s of user %s', key, self.login)
-        return self.vreg.property_value(key)
+            self.warning('incorrect value for eproperty %s of user %s',
+                         key, self.login)
+        return self._cw.vreg.property_value(key)
 
     def matching_groups(self, groups):
         """return the number of the given group(s) in which the user is