[PATCH 1 of 6 seda] [migration] Commit once for all

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 31 17:08:43 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1490950842 -7200
#      Fri Mar 31 11:00:42 2017 +0200
# Node ID 801dd5c8512d3d07b1db1712bc56d642be72214f
# Parent  fb33a8aeb23ab46168b0da44cfc5dc2c60629c27
[migration] Commit once for all

add avoid a lot of confirmation.

diff --git a/cubicweb_seda/migration/0.9.1_Any.py b/cubicweb_seda/migration/0.9.1_Any.py
--- a/cubicweb_seda/migration/0.9.1_Any.py
+++ b/cubicweb_seda/migration/0.9.1_Any.py
@@ -2,11 +2,11 @@
 
 for e in rql('Any X groupby X WHERE X container C HAVING COUNT(C) > 1').entities():
     container = max(c.eid for c in e.container)
     e.cw_set(container=None)
     e.cw_set(container=container)
-    commit()
+commit()
 
 sync_schema_props_perms('container')
 
 scheme = cnx.find('ConceptScheme', title=u'SEDA 2 : Status légaux').one()
 for old_label, new_label in [(u'Archive publique', u'Archives publiques'),


More information about the saem-devel mailing list