# HG changeset patch # User Sylvain Thénault # Date 1297963421 -3600 # Node ID f6ec6de03be66f1b9acda62b37a49354e0834b5d # Parent fa707848a88a1508f1882ee07375a724f83bfe83 [schema deserialization] enhance fix done in 7010:fa707848a88a to properly deal with cw 3.9 database diff -r fa707848a88a -r f6ec6de03be6 server/schemaserial.py --- a/server/schemaserial.py Thu Feb 17 17:46:10 2011 +0100 +++ b/server/schemaserial.py Thu Feb 17 18:23:41 2011 +0100 @@ -235,7 +235,14 @@ uniquecstreid, eeid, releid = values eschema = schema.schema_by_eid(eeid) relations = unique_togethers.setdefault(uniquecstreid, (eschema, [])) - relations[1].append(str(ertidx[releid])) + rel = ertidx[releid] + if isinstance(rel, schemamod.RelationSchema): + rtype = rel.type + else: + # not yet migrated 3.9 database ('relations' target type changed + # to CWRType in 3.10) + rtype = rel.rtype.type + relations[1].append(rtype) for eschema, unique_together in unique_togethers.itervalues(): eschema._unique_together.append(tuple(sorted(unique_together))) schema.infer_specialization_rules()