[doc] set_operation has been replaced by add_data
authorNoe Gaumont <ngaumont@logilab.fr>
Wed, 22 May 2019 11:32:09 +0200
changeset 12623 4e7ff3dd79fd
parent 12622 a068ce6329b5
child 12624 24b9073a6617
[doc] set_operation has been replaced by add_data See the changelog https://cubicweb.readthedocs.io/en/3.26/changes/changelog/#id14
doc/book/devrepo/repo/hooks.rst
--- a/doc/book/devrepo/repo/hooks.rst	Wed May 22 11:30:52 2019 +0200
+++ b/doc/book/devrepo/repo/hooks.rst	Wed May 22 11:32:09 2019 +0200
@@ -135,8 +135,6 @@
 
 .. sourcecode:: python
 
-   from cubicweb.server.hook import set_operation
-
    class CheckSubsidiaryCycleHook(Hook):
        __regid__ = 'check_no_subsidiary_cycle'
        events = ('after_add_relation',)
@@ -152,11 +150,11 @@
                check_cycle(self.session, eid, self.rtype)
 
 
-Here, we call :func:`set_operation` so that we will simply accumulate eids of
+Here, we call :func:`add_data` so that we will simply accumulate eids of
 entities to check at the end in a single `CheckSubsidiaryCycleOp`
 operation. Values are stored in a set associated to the
 'subsidiary_cycle_detection' transaction data key. The set initialization and
-operation creation are handled nicely by :func:`set_operation`.
+operation creation are handled nicely by :func:`add_data`.
 
 A more realistic example can be found in the advanced tutorial chapter
 :ref:`adv_tuto_security_propagation`.