[schema deserialization] _unique_together should hold string, not schema instance (may lead to crash during sync_schema_props_perms for instance) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 17 Feb 2011 17:46:10 +0100
branchstable
changeset 7010 fa707848a88a
parent 7008 5d0be45ee69d
child 7011 f6ec6de03be6
[schema deserialization] _unique_together should hold string, not schema instance (may lead to crash during sync_schema_props_perms for instance)
server/schemaserial.py
--- a/server/schemaserial.py	Thu Feb 17 16:46:25 2011 +0100
+++ b/server/schemaserial.py	Thu Feb 17 17:46:10 2011 +0100
@@ -235,7 +235,7 @@
             uniquecstreid, eeid, releid = values
             eschema = schema.schema_by_eid(eeid)
             relations = unique_togethers.setdefault(uniquecstreid, (eschema, []))
-            relations[1].append(ertidx[releid])
+            relations[1].append(str(ertidx[releid]))
         for eschema, unique_together in unique_togethers.itervalues():
             eschema._unique_together.append(tuple(sorted(unique_together)))
     schema.infer_specialization_rules()