server/sources/ldapuser.py
branchstable
changeset 1952 8e19c813750d
parent 1802 d628defebc17
child 1954 9b20f3504af8
--- a/server/sources/ldapuser.py	Wed May 27 11:19:37 2009 +0200
+++ b/server/sources/ldapuser.py	Wed May 27 11:24:35 2009 +0200
@@ -20,6 +20,8 @@
 FOR A PARTICULAR PURPOSE.
 """
 
+from base64 import b64decode
+
 from logilab.common.textutils import get_csv
 from rql.nodes import Relation, VariableRef, Constant, Function
 
@@ -166,7 +168,8 @@
         try:
             cursor = session.system_sql("SELECT eid, extid FROM entities WHERE "
                                         "source='%s'" % self.uri)
-            for eid, extid in cursor.fetchall():
+            for eid, b64extid in cursor.fetchall():
+                extid = b64decode(b64extid)
                 # if no result found, _search automatically delete entity information
                 res = self._search(session, extid, BASE)
                 if res: