]> git.parisson.com Git - django-jqchat.git/commitdiff
catch case where Pinax user does not have an account associated
authorTom S <scytale@gmail.com>
Thu, 22 Nov 2012 16:50:18 +0000 (16:50 +0000)
committerTom S <scytale@gmail.com>
Thu, 22 Nov 2012 16:50:18 +0000 (16:50 +0000)
jqchat/views.py

index 3f417eda75c13d98cfd24ea657b34a5d3a2b6cc9..9c95d818232cde5d9fab7635ccc44f35d7e55849 100644 (file)
@@ -105,7 +105,7 @@ class Ajax(object):
         # If using Pinax we can get the user's timezone.
         try:
             user_tz = self.request.user.account_set.all()[0].timezone
-        except AttributeError:
+        except (AttributeError, IndexError):
             user_tz = settings.TIME_ZONE
 
         # Extra JSON string to be spliced into the response.