]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/management/commands/maintaindb.py
creating the test_ui command skeleton
[osqa.git] / forum / management / commands / maintaindb.py
index a2fc8de17ba82218fe6759d7884de077bab43cde..26a12ff15d0a240387010b9fbac29017f876055f 100644 (file)
@@ -64,3 +64,12 @@ class Command(BaseCommand):
                     activate_latest_revision(node)
 
                     #print rev.node
+
+            if node.node_type == "question":
+                # Reset the answer count cache
+                node.reset_answer_count_cache()
+                print "Question #%(question_id)d: Answer count cache has been reset" % { 'question_id' : node.id }
+
+                # Reset the accepted count cache
+                node.reset_accepted_count_cache()
+                print "Question #%(question_id)d: Resetting the accepted count cache" % { 'question_id' : node.id }
\ No newline at end of file