[PATCH 1 of 8 sherpa] [migration] Nicer confirmation messages

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Mar 29 11:59:56 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1490202926 -3600
#      Wed Mar 22 18:15:26 2017 +0100
# Node ID 4b15f0c60c197ff0ea7535410409ca9b4c8961f1
# Parent  5a0cebef1a8eb78e7d90338aea947634c5433a54
[migration] Nicer confirmation messages

rdef.subject & all are schema objects whose repr() display unexpected internal information.

diff --git a/cubicweb_sherpa/migration/0.8.0_Any.py b/cubicweb_sherpa/migration/0.8.0_Any.py
--- a/cubicweb_sherpa/migration/0.8.0_Any.py
+++ b/cubicweb_sherpa/migration/0.8.0_Any.py
@@ -6,8 +6,9 @@ structure = graph.parent_structure('Conc
 optionals = utils.optional_relations(schema, structure)
 for child, relations in structure.iteritems():
     sync_schema_props_perms(child, syncprops=False)
 
 for rdef, parent_role in utils.mandatory_rdefs(schema, structure):
-    sync_schema_props_perms((rdef.subject, rdef.rtype, rdef.object), syncprops=False)
+    sync_schema_props_perms((str(rdef.subject), str(rdef.rtype), str(rdef.object)),
+                            syncprops=False)
 
 sync_schema_props_perms('SEDAArchiveUnit', syncprops=False)


More information about the saem-devel mailing list