fix some name errors
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 23 Sep 2009 11:03:57 +0200
changeset 3404 9cb6b0cc2a7c
parent 3403 715d691280ad
child 3405 9d31c9cb8103
fix some name errors
hooks/syncschema.py
hooks/syncsession.py
--- a/hooks/syncschema.py	Wed Sep 23 11:03:38 2009 +0200
+++ b/hooks/syncschema.py	Wed Sep 23 11:03:57 2009 +0200
@@ -1121,7 +1121,7 @@
     events = ('after_add_relation',)
 
     def __call__(self):
-        MemSchemaSpecializesAdd(session, etypeeid=self.eidfrom,
+        MemSchemaSpecializesAdd(self._cw, etypeeid=self.eidfrom,
                                 parentetypeeid=self.eidto)
 
 
@@ -1131,5 +1131,5 @@
     events = ('after_delete_relation',)
 
     def __call__(self):
-        MemSchemaSpecializesDel(session, etypeeid=self.eidfrom,
+        MemSchemaSpecializesDel(self._cw, etypeeid=self.eidfrom,
                                 parentetypeeid=self.eidto)
--- a/hooks/syncsession.py	Wed Sep 23 11:03:38 2009 +0200
+++ b/hooks/syncsession.py	Wed Sep 23 11:03:57 2009 +0200
@@ -197,7 +197,8 @@
                 # if for_user was set, delete has already been handled
                 break
         else:
-            _DelCWPropertyOp(session, cwpropdict=session.vreg['propertyvalues'], key=entity.pkey)
+            _DelCWPropertyOp(session, cwpropdict=session.vreg['propertyvalues'],
+                             key=self.entity.pkey)
 
 
 class AddForUserRelationHook(SyncSessionHook):