]> git.openstreetmap.org Git - osqa.git/blobdiff - forum_modules/sximporter/importer.py
Merging jambazov --> trunk.
[osqa.git] / forum_modules / sximporter / importer.py
index 25199dd50915844f18eecd9a3df530d7a2e55afe..0f7f812626e23968ff072493092218a5d984a383 100644 (file)
@@ -12,7 +12,6 @@ from forum.models.utils import dbsafe_encode
 from orm import orm
 
 from django.utils.encoding import force_unicode
-from django.db.utils import IntegrityError
 
 try:
     from cPickle import loads, dumps
@@ -433,6 +432,7 @@ def postimport(dump, uidmap, tagmap):
         post.save()
 
         all.append(int(post.id))
+        create_and_activate_revision(post)
 
         del post
 
@@ -481,6 +481,8 @@ def comment_import(dump, uidmap, posts):
                 action_date = oc.added_at
                 )
 
+        create_and_activate_revision(oc)
+
         create_action.save()
         oc.save()
 
@@ -495,7 +497,6 @@ def add_tags_to_post(post, tagmap):
     tags = [tag for tag in [tagmap.get(name.strip()) for name in post.tagnames.split(u' ') if name] if tag]
     post.tagnames = " ".join([t.name for t in tags]).strip()
     post.tags = tags
-    create_and_activate_revision(post)
 
 
 def create_and_activate_revision(post):
@@ -774,6 +775,8 @@ def pages_import(dump, currid):
                 author_id = 1
                 )
 
+        create_and_activate_revision(page)
+
         page.save()
         registry[sxp['url'][1:]] = page.id