summaryrefslogtreecommitdiff
path: root/pykolab/utils.py
diff options
context:
space:
mode:
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]