doc/book/en/devrepo/repo/hooks.rst
branchstable
changeset 6756 46297c498842
parent 6753 2bbc1010494c
child 8062 ffd510fb71da
--- a/doc/book/en/devrepo/repo/hooks.rst	Wed Dec 22 18:42:31 2010 +0100
+++ b/doc/book/en/devrepo/repo/hooks.rst	Mon Jan 03 11:22:32 2011 +0100
@@ -97,7 +97,7 @@
 
 .. sourcecode:: python
 
-    from cubicweb.server.hook import Hook, Operation, match_rtype
+    from cubicweb.server.hook import Hook, DataOperationMixIn, Operation, match_rtype
 
     def check_cycle(self, session, eid, rtype, role='subject'):
         parents = set([eid])
@@ -110,7 +110,7 @@
             parents.add(parent.eid)
 
 
-    class CheckSubsidiaryCycleOp(Operation):
+    class CheckSubsidiaryCycleOp(DataOperationMixIn, Operation):
 
         def precommit_event(self):
             check_cycle(self.session, self.eidto, 'subsidiary_of')