From 058d024a4d9310c66155b852eab73b3373ec3266 Mon Sep 17 00:00:00 2001 From: hernani Date: Fri, 15 Jul 2011 16:34:44 +0000 Subject: [PATCH] Fixes a bug where some suspended users where throwing 500's. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1121 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum/models/user.py b/forum/models/user.py index 84801fb..b3822a1 100644 --- a/forum/models/user.py +++ b/forum/models/user.py @@ -410,7 +410,7 @@ class User(BaseModel, DjangoUser): except MultipleObjectsReturned: logging.error("Multiple suspension actions found for user %s (%s)" % (self.username, self.id)) self.__dict__['_suspension_dencache_'] = self.reputes.filter(action__action_type="suspend", action__canceled=False - ).order_by('-action__action_date')[0] + ).order_by('-action__action_date')[0].action return self.__dict__['_suspension_dencache_'] -- 2.39.5