# HG changeset patch # User Sylvain Thénault # Date 1277111605 -7200 # Node ID 2de32c0c293ba451b231efe77d6027376af3a2a3 # Parent 904897d79f8608b3b25cd7437bd136023123378a [repo] call entity.check() once before_update hooks has been called, to let them a chance to transform data diff -r 904897d79f86 -r 2de32c0c293b server/repository.py --- a/server/repository.py Mon Jun 21 10:42:26 2010 +0200 +++ b/server/repository.py Mon Jun 21 11:13:25 2010 +0200 @@ -1105,8 +1105,6 @@ orig_edited_attributes = getattr(entity, 'edited_attributes', None) entity.edited_attributes = edited_attributes try: - if session.is_hook_category_activated('integrity'): - entity.check() only_inline_rels, need_fti_update = True, False relations = [] source = self.source_from_eid(entity.eid, session) @@ -1137,6 +1135,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.check() source.update_entity(session, entity) self.system_source.update_info(session, entity, need_fti_update) if source.should_call_hooks: