]> git.openstreetmap.org Git - osqa.git/commitdiff
#OSQA-581, resetting the answer count cache after the comment has been converted...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sat, 9 Apr 2011 20:40:34 +0000 (20:40 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sat, 9 Apr 2011 20:40:34 +0000 (20:40 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@956 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/actions/node.py

index 263839a136e79a47fa38ae1c6371ed92421813af..53699e967d1e91f83673274d9e28502667bdb5d7 100644 (file)
@@ -189,6 +189,8 @@ class CommentToAnswerAction(ActionProxy):
         self.node.last_edited = self\r
         self.node.update_last_activity(self.user, save=True)\r
 \r
+        # Now updated the cached data\r
+        question.reset_answer_count_cache()\r
 \r
     def describe(self, viewer=None):\r
         return _("%(user)s converted comment on %(question)s into an answer") % {\r