diff options
-rw-r--r-- | meetingtools/apps/auth/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meetingtools/apps/auth/views.py b/meetingtools/apps/auth/views.py index edff910..b396233 100644 --- a/meetingtools/apps/auth/views.py +++ b/meetingtools/apps/auth/views.py @@ -25,12 +25,12 @@ def meta(request,attr): values = filter(lambda x: x != "(null)",v.split(";")) return values; -def meta1(request,attr): +def meta1(request,attr,dflt=None): v = meta(request,attr) - if v: + if v is not None and len(v) > 0: return str(v[0]).decode('utf-8') else: - return None + return dflt def _localpart(a): if hasattr(a,'name'): |