[3.10] fix typo and error for pre 3.10 migration w/ postgres: we *must* call init_creating else the fti isn't correctly initialized, which may lead to silently rollbacked transaction stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 22 Jun 2011 18:23:44 +0200
branchstable
changeset 7550 183a61d1bab9
parent 7549 465009397d91
child 7551 2d4ba5b984dc
[3.10] fix typo and error for pre 3.10 migration w/ postgres: we *must* call init_creating else the fti isn't correctly initialized, which may lead to silently rollbacked transaction
misc/migration/3.10.9_Any.py
server/repository.py
--- a/misc/migration/3.10.9_Any.py	Wed Jun 22 16:34:27 2011 +0200
+++ b/misc/migration/3.10.9_Any.py	Wed Jun 22 18:23:44 2011 +0200
@@ -11,7 +11,7 @@
     from logilab.common.shellutils import progress
     from cubicweb.server.session import hooks_control
     rset = rql('Any X, XC WHERE X cwuri XC, X cwuri ~= "%/eid/%"')
-    title = "%i entites to fix" % len(rset)
+    title = "%i entities to fix" % len(rset)
     nbops = rset.rowcount
     enabled = interactive_mode
     with progress(title=title, nbops=nbops, size=30, enabled=enabled) as pb:
--- a/server/repository.py	Wed Jun 22 16:34:27 2011 +0200
+++ b/server/repository.py	Wed Jun 22 18:23:44 2011 +0200
@@ -231,6 +231,7 @@
         self.sources_by_eid = {}
         if self.config.quick_start \
                or not 'CWSource' in self.schema: # # 3.10 migration
+            self.system_source.init_creating()
             return
         session = self.internal_session()
         try: