Skip to content

Commit

Permalink
Improved id format
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed Mar 24, 2017
1 parent a514123 commit 9265625
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Extensions/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ def import_contacts(self, dochange=''):
childs[idp] = []
childs[idp].append(id)
if data[4]:
if data[4] not in org_infos[typ]:
org_infos[typ][safe_unicode(data[4])] = idnormalizer.normalize(safe_encode(data[4]))
orgs[id]['typ'] = org_infos[typ][safe_unicode(data[4])]
utyp = safe_unicode(data[4])
if utyp not in org_infos[typ]:
org_infos[typ][utyp] = idnormalizer.normalize(utyp)
orgs[id]['typ'] = org_infos[typ][utyp]
else: # we take the first value
orgs[id]['typ'] = org_infos[typ].values()[0]

Expand Down

0 comments on commit 9265625

Please sign in to comment.