]> git.openstreetmap.org Git - osqa.git/commitdiff
cast project badges Bug Buster badge setting to int type
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 12 Apr 2012 14:39:46 +0000 (14:39 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 12 Apr 2012 14:39:46 +0000 (14:39 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1250 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/project_badges/badges.py

index f9b6fbc75b3e7e349743e9bef0212e6b3b290ba4..9633567c487feb47052865fda8b3b9936bc5482a 100644 (file)
@@ -11,10 +11,10 @@ class BugBuster(AbstractBadge):
     listen_to = (VoteUpAction, )
 
     def award_to(self, action):
-        if action.node.node_type == "question" and action.node.score == settings.BUG_BUSTER_VOTES_UP:
+        if action.node.node_type == "question" and int(action.node.score) == int(settings.BUG_BUSTER_VOTES_UP):
             try:
                 bug = Tag.objects.get(name="bug")
                 if bug in action.node.tags.all():
                     return action.node.author
-            except:
+            except Exception:
                 pass