From: jordan Date: Wed, 16 Mar 2011 19:21:27 +0000 (+0000) Subject: #OSQA-603, fixing the badges count calculation error. After the update of the count... X-Git-Tag: live~410 X-Git-Url: https://git.openstreetmap.org/osqa.git/commitdiff_plain/0ad5d07da08894c96caf49e05e9cf649e58d6554 #OSQA-603, fixing the badges count calculation error. After the update of the count field we have to save the model. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@857 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum_modules/sximporter/importer.py b/forum_modules/sximporter/importer.py index 5828090..1f71f37 100644 --- a/forum_modules/sximporter/importer.py +++ b/forum_modules/sximporter/importer.py @@ -768,6 +768,10 @@ def badges_import(dump, uidmap, post_list): osqaa.save() badge.awarded_count += 1 + + # After the update of the badge awarded count property we should save the model. + badge.save() + user_badge_count[user_id] += 1 readTable(dump, "Users2Badges", callback)