]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/management/commands/maintaindb.py
be able to handle Unicode GET params in auth.py properly
[osqa.git] / forum / management / commands / maintaindb.py
index a2fc8de17ba82218fe6759d7884de077bab43cde..c41d36bb29bb68c9e5283fe2d3379b024b91d96b 100644 (file)
@@ -30,7 +30,7 @@ def create_revision(node):
             tagnames = node.tagnames,
             title = node.title,
             )
-
+    rev.save()
     node.save()
 
     return node
@@ -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