should use match_rtype, not entity_implements in such cases
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 08 Dec 2009 18:04:29 +0100
changeset 4050 f2e1bb4b7536
parent 4049 5838a4b0766d
child 4051 eec34250a645
should use match_rtype, not entity_implements in such cases
hooks/bookmark.py
--- a/hooks/bookmark.py	Tue Dec 08 17:48:26 2009 +0100
+++ b/hooks/bookmark.py	Tue Dec 08 18:04:29 2009 +0100
@@ -7,7 +7,6 @@
 """
 __docformat__ = "restructuredtext en"
 
-from cubicweb.selectors import entity_implements
 from cubicweb.server import hook
 
 
@@ -22,7 +21,7 @@
 class DelBookmarkedByHook(hook.Hook):
     """ensure user logins are stripped"""
     __regid__ = 'autodelbookmark'
-    __select__ = hook.Hook.__select__ & entity_implements('bookmarked_by',)
+    __select__ = hook.Hook.__select__ & hook.match_rtype('bookmarked_by',)
     category = 'bookmark'
     events = ('after_delete_relation',)