use cw 3.12.7 repairing selector stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Nov 2011 18:04:32 +0100
branchstable
changeset 792 f5af3ae56715
parent 791 5ac76ce656dd
child 793 d2e8558a7e91
use cw 3.12.7 repairing selector
hooks.py
--- a/hooks.py	Wed Nov 09 18:04:25 2011 +0100
+++ b/hooks.py	Wed Nov 09 18:04:32 2011 +0100
@@ -14,7 +14,7 @@
 from cubicweb import ValidationError
 from cubicweb.selectors import is_instance
 from cubicweb.uilib import text_cut
-from cubicweb.server import hook
+from cubicweb.server import hook, session
 from cubicweb.hooks import notification as notifhooks
 from cubicweb.sobjects import notification as notifviews
 
@@ -124,7 +124,7 @@
 
 class StartTestAfterAddRevision(hook.Hook):
     __regid__ = 'apycot.start_test_on_new_rev'
-    __select__ = hook.Hook.__select__ & is_instance('Revision')
+    __select__ = hook.Hook.__select__ & is_instance('Revision') & ~session.repairing()
     events = ('after_add_entity',)
 
     def __call__(self):