[PATCH skos] [dataimport] fix CubicWeb 3.25 compatibility

Sylvain Thénault sylvain.thenault at logilab.fr
Tue Mar 21 11:23:45 CET 2017


applied


Le 21/03/2017 à 11:02, Philippe Pepiot a écrit :
> # HG changeset patch
> # User Philippe Pepiot <philippe.pepiot at logilab.fr>
> # Date 1490090259 -3600
> #      Tue Mar 21 10:57:39 2017 +0100
> # Node ID 0981f91a589d71344481da0e874598bcdb2dbf70
> # Parent  3f2be8f07627ccc45a4441d3e9ecaea79240bbc2
> # Available At https://hg.logilab.org/review/cubes/skos
> #              hg pull https://hg.logilab.org/review/cubes/skos -r 0981f91a589d
> # Tested at: https://jenkins.logilab.org/job/cubicweb-skos/25/
> [dataimport] fix CubicWeb 3.25 compatibility
>
> cnx.session is gone with CubicWeb 3.25, use vreg to get the schema instead.
>
> diff --git a/post321_import.py b/post321_import.py
> --- a/post321_import.py
> +++ b/post321_import.py
> @@ -103,7 +103,7 @@ def store_skos_extentities(cnx, store, e
>      entities = imap(record_scheme, entities)
>      etypes_order_hint = ('ConceptScheme', 'Concept', 'Label')
>      existing_relations = SKOSRelationMapping(cnx, source)
> -    importer = SKOSExtEntitiesImporter(schema=cnx.session.repo.schema, store=store,
> +    importer = SKOSExtEntitiesImporter(schema=cnx.vreg.schema, store=store,
>                                         extid2eid=extid2eid, existing_relations=existing_relations,
>                                         restore_relations=restore_relations,
>                                         etypes_order_hint=etypes_order_hint, import_log=import_log,
>

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the saem-devel mailing list