From: jordan Date: Thu, 12 Apr 2012 14:39:46 +0000 (+0000) Subject: cast project badges Bug Buster badge setting to int type X-Git-Tag: live~67 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/d29427bb9526e8ded713da43889c9bc9a8a18370?ds=sidebyside cast project badges Bug Buster badge setting to int type git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1250 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum_modules/project_badges/badges.py b/forum_modules/project_badges/badges.py index f9b6fbc..9633567 100644 --- a/forum_modules/project_badges/badges.py +++ b/forum_modules/project_badges/badges.py @@ -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