server/repository.py
changeset 5811 e77cea9721e7
parent 5765 14daeb31ee67
parent 5808 2de32c0c293b
child 5815 282194aa43f3
--- a/server/repository.py	Fri Jun 18 18:31:22 2010 +0200
+++ b/server/repository.py	Mon Jun 21 13:23:11 2010 +0200
@@ -1095,8 +1095,6 @@
         orig_edited_attributes = getattr(entity, 'edited_attributes', None)
         entity.edited_attributes = edited_attributes
         try:
-            if session.is_hook_category_activated('integrity'):
-                entity._cw_check()
             only_inline_rels, need_fti_update = True, False
             relations = []
             source = self.source_from_eid(entity.eid, session)
@@ -1127,6 +1125,8 @@
                                   eidfrom=entity.eid, rtype=attr, eidto=value)
                 if not only_inline_rels:
                     hm.call_hooks('before_update_entity', session, entity=entity)
+            if session.is_hook_category_activated('integrity'):
+                entity._cw_check()
             source.update_entity(session, entity)
             self.system_source.update_info(session, entity, need_fti_update)
             if source.should_call_hooks: