hooks/metadata.py
changeset 5877 0c7b7b76a84f
parent 5782 8ff48d1a319f
child 6142 8bc6eac1fac1
--- a/hooks/metadata.py	Fri Jul 02 19:14:48 2010 +0200
+++ b/hooks/metadata.py	Mon Jul 05 12:04:32 2010 +0200
@@ -21,7 +21,7 @@
 
 from datetime import datetime
 
-from cubicweb.selectors import implements
+from cubicweb.selectors import is_instance
 from cubicweb.server import hook
 from cubicweb.server.utils import eschema_eid
 
@@ -140,7 +140,7 @@
 class FixUserOwnershipHook(MetaDataHook):
     """when a user has been created, add owned_by relation on itself"""
     __regid__ = 'fixuserowner'
-    __select__ = MetaDataHook.__select__ & implements('CWUser')
+    __select__ = MetaDataHook.__select__ & is_instance('CWUser')
     events = ('after_add_entity',)
 
     def __call__(self):