[migration] Skip virtual rtypes when adding relation definition through add_cube
Virtual rtypes should be skipped as they are added dynamically on loading
schema. Those are skipped by e.g. schema serialisation or add_entity_type, do
the same thing here.
--- a/cubicweb/server/migractions.py Thu Jan 19 11:10:47 2017 +0100
+++ b/cubicweb/server/migractions.py Thu Jan 19 11:12:07 2017 +0100
@@ -675,6 +675,8 @@
new.add(eschema.type)
# check if attributes has been added to existing entities
for rschema in newcubes_schema.relations():
+ if rschema.type in VIRTUAL_RTYPES:
+ continue
existingschema = self.repo.schema.rschema(rschema.type)
for (fromtype, totype) in rschema.rdefs:
# if rdef already exists or is infered from inheritance,