Commits

Mike Bayer committed 5b2152d

fix if no email present

Comments (0)

Files changed (2)

tracvatar/__init__.py

-__version__ = '1.2'
+__version__ = '1.3'

tracvatar/web_ui.py

         )(stream)
 
     def _prefs_filter(self, data, author_data):
-        if "settings" not in data:
-            return
-
-        email = data['settings']['session']['email']
+        if 'settings' not in data or \
+            'session' not in data['settings'] or \
+            'email' not in data['settings']['session']:
+            email = ''
+        else:
+            email = data['settings']['session']['email']
 
         return Transformer('//form[@id="userprefs"]/table').append(
             tag.tr(