From: Tom S Date: Thu, 22 Nov 2012 16:50:18 +0000 (+0000) Subject: catch case where Pinax user does not have an account associated X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=965aafaa4c2c40c7c1858637ba73ea3e39ed4bb4;p=django-jqchat.git catch case where Pinax user does not have an account associated --- diff --git a/jqchat/views.py b/jqchat/views.py index 3f417ed..9c95d81 100644 --- a/jqchat/views.py +++ b/jqchat/views.py @@ -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.