]> git.openstreetmap.org Git - osqa.git/commitdiff
#OSQA-603, fixing the badges count calculation error. After the update of the count...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 16 Mar 2011 19:21:27 +0000 (19:21 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 16 Mar 2011 19:21:27 +0000 (19:21 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@857 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/sximporter/importer.py

index 58280905c2870b3fd01d155929839921bec4fbb6..1f71f379846fd0f66eedf4ead7de1fc13576393f 100644 (file)
@@ -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)