]> git.openstreetmap.org Git - osqa.git/commitdiff
Fixes a bug where some suspended users where throwing 500's.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 15 Jul 2011 16:34:44 +0000 (16:34 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Fri, 15 Jul 2011 16:34:44 +0000 (16:34 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1121 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/models/user.py

index 84801fb0e0acd12879cec4c7b8726f0ce098ffa1..b3822a188bce4ed5187ec8cdd89f3b7dbda184b1 100644 (file)
@@ -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_']