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:43:18 +0200 |
commit | f9598d9d10360699f9c295ec6febe4d005663721 (patch) | |
tree | 5524233f508abc0cc5c8b0cd6b038bd69ef48dd0 | |
parent | a57e486f5739b4b374e428d43497909ad91fba2a (diff) | |
download | pykolab-f9598d9d10360699f9c295ec6febe4d005663721.tar.gz |
pykolab/utils really cannot deal with a list of primary mail attribute values
-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 57617a7..f018f78 100644 --- a/pykolab/utils.py +++ b/pykolab/utils.py @@ -292,6 +292,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] |