[migraction] use role instead of x stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 Aug 2009 15:04:35 +0200
branchstable
changeset 2962 5e2239672e16
parent 2961 6d833a440575
child 2963 12ad88615a12
[migraction] use role instead of x
server/migractions.py
--- a/server/migractions.py	Fri Aug 21 15:03:56 2009 +0200
+++ b/server/migractions.py	Fri Aug 21 15:04:35 2009 +0200
@@ -415,12 +415,12 @@
                          {'x': str(repoeschema), 'y': str(espschema)})
         self.rqlexecall(ss.updateeschema2rql(eschema),
                         ask_confirm=self.verbosity >= 2)
-        for rschema, targettypes, x in eschema.relation_definitions(True):
-            if x == 'subject':
+        for rschema, targettypes, role in eschema.relation_definitions(True):
+            if role == 'subject':
                 if not rschema in repoeschema.subject_relations():
                     continue
                 subjtypes, objtypes = [etype], targettypes
-            else: # x == 'object'
+            else: # role == 'object'
                 if not rschema in repoeschema.object_relations():
                     continue
                 subjtypes, objtypes = targettypes, [etype]