mango r218 - in branches/django: . mango



Author: ovitters
Date: Sun Jun 22 00:10:46 2008
New Revision: 218
URL: http://svn.gnome.org/viewvc/mango?rev=218&view=rev

Log:
Make sure LDAP attributes like description are optional.


Modified:
   branches/django/   (props changed)
   branches/django/mango/views.py

Modified: branches/django/mango/views.py
==============================================================================
--- branches/django/mango/views.py	(original)
+++ branches/django/mango/views.py	Sun Jun 22 00:10:46 2008
@@ -86,7 +86,7 @@
 
     for item in ('uid', 'cn', 'mail', 'description'):
         node = ET.SubElement(el, item)
-        node.text = user.__dict__[item]
+        node.text = user.__dict__.get(item, '')
 
     for key in user.__dict__.get('authorizedKey', []):
         # TODO:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]