# HG changeset patch # User Sylvain Thénault # Date 1274459980 -7200 # Node ID 8dfb1726526b9ce70fe56a8ea34f688074799145 # Parent df5551d697e8c8ce1879113ce1d625e921744b64 [entity] clearing adapters cache in clear_relations_cache avoid weird caching issue, notably on repository session's user diff -r df5551d697e8 -r 8dfb1726526b entity.py --- a/entity.py Fri May 21 15:06:29 2010 +0200 +++ b/entity.py Fri May 21 18:39:40 2010 +0200 @@ -937,6 +937,7 @@ """ if rtype is None: self._cw_related_cache = {} + self._cw_adapters_cache = {} else: assert role self._cw_related_cache.pop('%s_%s' % (rtype, role), None) @@ -953,17 +954,12 @@ self._cw_completed = False self.clear() # clear relations cache - for rschema, _, role in self.e_schema.relation_definitions(): - self.cw_clear_relation_cache(rschema.type, role) + self.cw_clear_relation_cache() # rest path unique cache try: del self.__unique except AttributeError: pass - try: - del self._cw_adapters_cache - except AttributeError: - pass # raw edition utilities ###################################################