hooks/syncschema.py
branchstable
changeset 8192 0067653190c7
parent 8178 2d62b6017700
child 8215 4b32678c21a7
equal deleted inserted replaced
8191:eceaf9e21966 8192:0067653190c7
   266         cmap = ss.cstrtype_mapping(session)
   266         cmap = ss.cstrtype_mapping(session)
   267         for rtype in (META_RTYPES - VIRTUAL_RTYPES):
   267         for rtype in (META_RTYPES - VIRTUAL_RTYPES):
   268             try:
   268             try:
   269                 rschema = schema[rtype]
   269                 rschema = schema[rtype]
   270             except KeyError:
   270             except KeyError:
   271                 if rtype == 'cw_source':
   271                 self.critical('rtype %s was not handled at cwetype creation time', rtype)
   272                     continue # XXX 3.10 migration
   272                 continue
   273                 raise
       
   274             sampletype = rschema.subjects()[0]
   273             sampletype = rschema.subjects()[0]
   275             desttype = rschema.objects()[0]
   274             desttype = rschema.objects()[0]
   276             rdef = copy(rschema.rdef(sampletype, desttype))
   275             rdef = copy(rschema.rdef(sampletype, desttype))
   277             rdef.subject = _MockEntity(eid=entity.eid)
   276             rdef.subject = _MockEntity(eid=entity.eid)
   278             mock = _MockEntity(eid=None)
   277             mock = _MockEntity(eid=None)