Skip to content
Snippets Groups Projects
Verified Commit fc307bf6 authored by David Beniamine's avatar David Beniamine
Browse files

Handle adr field

parent cc67c2b2
Branches
No related tags found
No related merge requests found
...@@ -9,6 +9,10 @@ def getCard(first, last, data): ...@@ -9,6 +9,10 @@ def getCard(first, last, data):
card.add('fn').value = f'{first} {last}' card.add('fn').value = f'{first} {last}'
objectValues = ['org'] objectValues = ['org']
for k, t, v in data: for k, t, v in data:
if k == 'adr':
box, street, city, region, code, country = v.split(';')
card.add('adr').value = vobject.vcard.Address(street, city, region, code, country, box)
else:
v = v if k.lower() not in objectValues else [v] v = v if k.lower() not in objectValues else [v]
card.add(k).value = v card.add(k).value = v
if t: if t:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment