From 0ad5d07da08894c96caf49e05e9cf649e58d6554 Mon Sep 17 00:00:00 2001 From: jordan Date: Wed, 16 Mar 2011 19:21:27 +0000 Subject: [PATCH] #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 --- forum_modules/sximporter/importer.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.45.1