ldap: reset cache when a user is deleted stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Sat, 29 May 2010 10:03:50 +0000
branchstable
changeset 5604 60a92bf32a18
parent 5603 d8d9f4ec252d
child 5605 2604545d7dd9
ldap: reset cache when a user is deleted When a user is deleted from ldap, reset both caches used by the source otherwise the search is not performed again and exceptions such as UnknownEid: No entity with eid 74078 in the repository will occur
server/sources/ldapuser.py
--- a/server/sources/ldapuser.py	Sat May 29 09:58:23 2010 +0000
+++ b/server/sources/ldapuser.py	Sat May 29 10:03:50 2010 +0000
@@ -513,7 +513,7 @@
                              eid, base)
                 entity = session.entity_from_eid(eid, 'CWUser')
                 self.repo.delete_info(session, entity, self.uri, base)
-                self._cache.pop(base, None)
+                self.reset_cache()
             return []
 ##         except ldap.REFERRAL, e:
 ##             cnx = self.handle_referral(e)