equal
deleted
inserted
replaced
199 # search for existant email first, may be coming from another source |
199 # search for existant email first, may be coming from another source |
200 rset = self._cw.execute('EmailAddress X WHERE X address %(addr)s', |
200 rset = self._cw.execute('EmailAddress X WHERE X address %(addr)s', |
201 {'addr': emailaddr}) |
201 {'addr': emailaddr}) |
202 if not rset: |
202 if not rset: |
203 # not found, create it. first forge an external id |
203 # not found, create it. first forge an external id |
204 emailextid = userdict['dn'] + '@@' + emailaddr |
204 emailextid = userdict['dn'] + '@@' + emailaddr.encode('utf-8') |
205 email = self.extid2entity(emailextid, 'EmailAddress', |
205 email = self.extid2entity(emailextid, 'EmailAddress', |
206 address=emailaddr) |
206 address=emailaddr) |
207 entity.cw_set(use_email=email) |
207 entity.cw_set(use_email=email) |
208 elif self.sourceuris: |
208 elif self.sourceuris: |
209 # pop from sourceuris anyway, else email may be removed by the |
209 # pop from sourceuris anyway, else email may be removed by the |