diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-05-16 20:43:18 +0200 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-05-16 20:44:44 +0200 |
commit | fdf323657d2ccb3dcb3b77bed091707b2dfc0c23 (patch) | |
tree | 6d309483a06241fff5a5ea744dcd21c445ac905b /pykolab/utils.py | |
parent | 2086e982f410d70c11a9da7eb463cd1b917c8175 (diff) | |
download | pykolab-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.py | 3 |
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] |