[saem-devel] [PATCH 08 of 10] [migration] Fix rql query

saem-devel at lists.cubicweb.org saem-devel at lists.cubicweb.org
Wed Jan 25 10:05:06 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1485271873 -3600
#      Tue Jan 24 16:31:13 2017 +0100
# Node ID 7baaa09b7e93291b623b36132421cfe4e70a1004
# Parent  296cc3156f0442c683f4fc0e925719f9e7d29578
[migration] Fix rql query

a variable name conflict causes a type resolver error.

diff --git a/cubicweb_saem_ref/migration/0.14.0_Any.py b/cubicweb_saem_ref/migration/0.14.0_Any.py
--- a/cubicweb_saem_ref/migration/0.14.0_Any.py
+++ b/cubicweb_saem_ref/migration/0.14.0_Any.py
@@ -10,8 +10,7 @@ add_relation_definition(
     'OrganizationUnit', 'use_authorityrecord', 'AuthorityRecord')
 
 # Set default "use_authorityrecord" relation to existing AuthorityRecord
-rql('SET OU use_authorityrecord AR WHERE'
-    ' OU archival_role AR, AR name "archival"')
+rql('SET OU use_authorityrecord X WHERE OU archival_role AR, AR name "archival"')
 commit(ask_confirm=False)
 
 add_attribute('Organization', 'ark')


More information about the saem-devel mailing list