1. Mike Bayer
  2. tracvatar

Commits

Mike Bayer  committed 5b2152d

fix if no email present

  • Participants
  • Parent commits c723b48
  • Branches default

Comments (0)

Files changed (2)

File tracvatar/__init__.py

View file
-__version__ = '1.2'
+__version__ = '1.3'

File tracvatar/web_ui.py

View file
         )(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(