# HG changeset patch # User Sylvain Thénault # Date 1484820727 -3600 # Node ID 51057823b528c6a0f489865e457d06dc627c4721 # Parent 2f36115d38b125c637ae436c9eb26eddff81dd21 [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. diff -r 2f36115d38b1 -r 51057823b528 cubicweb/server/migractions.py --- 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,