summaryrefslogtreecommitdiff
path: root/pykolab/utils.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-05-16 18:43:18 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-05-16 18:44:44 (GMT)
commitfdf323657d2ccb3dcb3b77bed091707b2dfc0c23 (patch)
tree6d309483a06241fff5a5ea744dcd21c445ac905b /pykolab/utils.py
parent2086e982f410d70c11a9da7eb463cd1b917c8175 (diff)
downloadpykolab-fdf323657d2ccb3dcb3b77bed091707b2dfc0c23.tar.gz
pykolab/utils really cannot deal with a list of primary mail attribute values
Diffstat (limited to 'pykolab/utils.py')
-rw-r--r--pykolab/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py
index b0de166..5cba8f9 100644
--- a/pykolab/utils.py
+++ b/pykolab/utils.py
@@ -321,6 +321,9 @@ def normalize(_object):
result['surname'] = result['sn'].replace(' ', '')
if result.has_key('mail'):
+ if isinstance(result['mail'], list):
+ result['mail'] = result['mail'][0]
+
if len(result['mail']) > 0:
if len(result['mail'].split('@')) > 1:
result['domain'] = result['mail'].split('@')[1]