[migtration] fix migration script for 'dont cross' relations
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 14 Feb 2011 23:18:20 +0100
changeset 6992 38f2e306ad8b
parent 6988 2f4a7d1e15b3
child 6998 d662dfdfe495
[migtration] fix migration script for 'dont cross' relations
misc/migration/3.11.0_Any.py
--- a/misc/migration/3.11.0_Any.py	Mon Feb 14 09:38:03 2011 +0100
+++ b/misc/migration/3.11.0_Any.py	Mon Feb 14 23:18:20 2011 +0100
@@ -73,8 +73,9 @@
         for rtype in mapping['dont_cross_relations']:
             create_entity('CWSourceSchemaConfig',
                           cw_for_source=source,
-                          cw_schema=session.entity_from_eid(schema[etype].eid),
-                          options=u'dontcross')
+                          cw_schema=session.entity_from_eid(schema[rtype].eid),
+                          options=u'dontcross',
+                          ask_confirm=False)
         # latest update time cwproperty is now a source attribute (latest_retrieval)
         pkey = u'sources.%s.latest-update-time' % source.uri
         rset = session.execute('Any V WHERE X is CWProperty, X value V, X pkey %(k)s',