X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/f1defc59ca7a7b15e17e8a59c72a726ae937d8e5..058d024a4d9310c66155b852eab73b3373ec3266:/forum/models/user.py 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_']