[ldapfeed] fix encode error during initial user import stable cubicweb-centos-version-3.17.13-1 cubicweb-debian-version-3.17.13-1 cubicweb-version-3.17.13
authorDimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
Fri, 14 Feb 2014 15:42:25 +0100
branchstable
changeset 9535 09b4ebb9b0f1
parent 9528 7f3a3fc4a2a3
child 9536 1e39c5e91b68
child 9540 43b4895a150f
[ldapfeed] fix encode error during initial user import Closes #3539196.
sobjects/ldapparser.py
--- a/sobjects/ldapparser.py	Fri Feb 14 10:39:16 2014 +0100
+++ b/sobjects/ldapparser.py	Fri Feb 14 15:42:25 2014 +0100
@@ -201,7 +201,7 @@
                                    {'addr': emailaddr})
             if not rset:
                 # not found, create it. first forge an external id
-                emailextid = userdict['dn'] + '@@' + emailaddr
+                emailextid = userdict['dn'] + '@@' + emailaddr.encode('utf-8')
                 email = self.extid2entity(emailextid, 'EmailAddress',
                                           address=emailaddr)
                 entity.cw_set(use_email=email)