# HG changeset patch # User Sylvain Thénault # Date 1246287771 -7200 # Node ID 58bef4f707ce9f4fa7e513ba58a8614e5301411c # Parent c8c8ef5c5c6563b7f95bdfa0c8b546f417e18e4f update calls to a deprecated method diff -r c8c8ef5c5c65 -r 58bef4f707ce server/hooks.py --- a/server/hooks.py Mon Jun 29 16:18:07 2009 +0200 +++ b/server/hooks.py Mon Jun 29 17:02:51 2009 +0200 @@ -85,16 +85,16 @@ """ ftcontainer = session.repo.schema.rschema(rtype).fulltext_container if ftcontainer == 'subject': - FTIndexEntityOp(session, entity=session.entity(eidto)) + FTIndexEntityOp(session, entity=session.entity_from_eid(eidto)) elif ftcontainer == 'object': - FTIndexEntityOp(session, entity=session.entity(eidfrom)) + FTIndexEntityOp(session, entity=session.entity_from_eid(eidfrom)) def fti_update_after_delete_relation(session, eidfrom, rtype, eidto): """sync fulltext index when relevant relation is deleted. Reindexing both entities is necessary. """ if session.repo.schema.rschema(rtype).fulltext_container: - FTIndexEntityOp(session, entity=session.entity(eidto)) - FTIndexEntityOp(session, entity=session.entity(eidfrom)) + FTIndexEntityOp(session, entity=session.entity_from_eid(eidto)) + FTIndexEntityOp(session, entity=session.entity_from_eid(eidfrom)) class SyncOwnersOp(PreCommitOperation): @@ -379,7 +379,7 @@ etype = session.describe(fromeid)[0] if not (session.is_super_session or 'managers' in session.user.groups): if not state is None: - entity = session.entity(fromeid) + entity = session.entity_from_eid(fromeid) # we should find at least one transition going to this state try: iter(state.transitions(entity, toeid)).next() diff -r c8c8ef5c5c65 -r 58bef4f707ce server/schemahooks.py --- a/server/schemahooks.py Mon Jun 29 16:18:07 2009 +0200 +++ b/server/schemahooks.py Mon Jun 29 17:02:51 2009 +0200 @@ -38,7 +38,7 @@ def get_constraints(session, entity): constraints = [] for cstreid in session.transaction_data.get(entity.eid, ()): - cstrent = session.entity(cstreid) + cstrent = session.entity_from_eid(cstreid) cstr = CONSTRAINTS[cstrent.type].deserialize(cstrent.value) cstr.eid = cstreid constraints.append(cstr) diff -r c8c8ef5c5c65 -r 58bef4f707ce sobjects/supervising.py --- a/sobjects/supervising.py Mon Jun 29 16:18:07 2009 +0200 +++ b/sobjects/supervising.py Mon Jun 29 17:02:51 2009 +0200 @@ -48,7 +48,7 @@ events = ('before_delete_entity',) def _call(self, eid): - entity = self.session.entity(eid) + entity = self.session.entity_from_eid(eid) try: title = entity.dc_title() except: