[PATCH 1 of 1 eac] [migration] Add missing bits of migration

Denis Laxalde denis.laxalde at logilab.fr
Thu Mar 9 10:29:36 CET 2017


Sylvain Thenault a écrit :
> # HG changeset patch
> # User Sylvain Thénault <sylvain.thenault at logilab.fr>
> # Date 1489011066 -3600
> #      Wed Mar 08 23:11:06 2017 +0100
> # Node ID 5507b0f1f5f210f05a3c5c06251217b812769cc7
> # Parent  22b591ad3be1570a5104add188131ff489bf2460
> [migration] Add missing bits of migration
>
> ensure permissions of relation impacted by 22b591ad3be1 are synced.
>
> diff --git a/cubicweb_eac/migration/0.5.0_Any.py b/cubicweb_eac/migration/0.5.0_Any.py
> --- a/cubicweb_eac/migration/0.5.0_Any.py
> +++ b/cubicweb_eac/migration/0.5.0_Any.py
> @@ -1,1 +1,14 @@
> +from cubicweb_compound import utils
> +from cubicweb_eac import AuthorityRecordGraph
> +
>  add_cube('compound')
> +
> +graph = AuthorityRecordGraph(schema)
> +structure = graph.parent_structure('ConceptScheme')

ConceptScheme?

> +
> +optionals = utils.optional_relations(schema, structure)
> +for child, relations in structure.iteritems():
> +    sync_schema_props_perms(child, syncprops=False)

"relations" is not used so "for child in structure:"

> +for rdef, parent_role in utils.mandatory_rdefs(schema, structure):
> +    sync_schema_props_perms((rdef.subject, rdef.rtype, rdef.object), syncprops=False)
>

It looks like we're missing a sync_graph_schema_props_perms function in
cubicweb_compount.utils.



More information about the saem-devel mailing list