From 965aafaa4c2c40c7c1858637ba73ea3e39ed4bb4 Mon Sep 17 00:00:00 2001 From: Tom S Date: Thu, 22 Nov 2012 16:50:18 +0000 Subject: [PATCH] catch case where Pinax user does not have an account associated --- jqchat/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.39.5