hooks/integrity.py
changeset 5877 0c7b7b76a84f
parent 5538 752bc67064f2
child 6142 8bc6eac1fac1
child 6375 df4fd2a1b0e7
--- a/hooks/integrity.py	Fri Jul 02 19:14:48 2010 +0200
+++ b/hooks/integrity.py	Mon Jul 05 12:04:32 2010 +0200
@@ -27,7 +27,7 @@
 
 from cubicweb import ValidationError
 from cubicweb.schema import RQLConstraint, RQLUniqueConstraint
-from cubicweb.selectors import implements
+from cubicweb.selectors import is_instance
 from cubicweb.uilib import soup2xhtml
 from cubicweb.server import hook
 from cubicweb.server.hook import set_operation
@@ -253,7 +253,7 @@
     """delete the composed of a composite relation when this relation is deleted
     """
     __regid__ = 'checkownersgroup'
-    __select__ = IntegrityHook.__select__ & implements('CWGroup')
+    __select__ = IntegrityHook.__select__ & is_instance('CWGroup')
     events = ('before_delete_entity', 'before_update_entity')
 
     def __call__(self):
@@ -293,7 +293,7 @@
 class StripCWUserLoginHook(IntegrityHook):
     """ensure user logins are stripped"""
     __regid__ = 'stripuserlogin'
-    __select__ = IntegrityHook.__select__ & implements('CWUser')
+    __select__ = IntegrityHook.__select__ & is_instance('CWUser')
     events = ('before_add_entity', 'before_update_entity',)
 
     def __call__(self):