]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/default_badges/badges.py
Some changes necessary to make cache work on Django 1.2.
[osqa.git] / forum_modules / default_badges / badges.py
index ba01a0fe39e7ffed3fb7f9b6193a1c777e10c39f..2305dd4ddc76f3e4f8974bbbce45897ebc6e3747 100644 (file)
@@ -16,8 +16,8 @@ class QuestionViewBadge(AbstractBadge):
         return _('Asked a question with %s views') % str(self.nviews)
 
     def award_to(self, action):
-        if action.question.extra_count == int(self.nviews):
-            return action.question.author
+        if action.node.extra_count == int(self.nviews):
+            return action.node.author
 
 
 class PopularQuestion(QuestionViewBadge):