]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/user.py
Fixes a bug where some suspended users where throwing 500's.
[osqa.git] / 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_']