[PATCH seda] Import cubicweb_skos instead of cubes.skos

Denis Laxalde denis.laxalde at logilab.fr
Tue Oct 2 10:01:01 CEST 2018


Frank Bessou a écrit :
> # HG changeset patch
> # User Frank Bessou <frank.bessou at logilab.fr>
> # Date 1538399299 -7200
> #      Mon Oct 01 15:08:19 2018 +0200
> # Node ID 9e6614f4159d2a6c2ba0f00afdaa77edfa1d7782
> # Parent  0b663b4c509f6669162e88675a67fffd8fc9a650
> # Available At http://hg.logilab.org/review/cubes/seda
> #              hg pull http://hg.logilab.org/review/cubes/seda -r 9e6614f4159d
> Import cubicweb_skos instead of cubes.skos

Applied, thanks.

> When both cubes.skos and cubicweb_skos are used to import the same
> module, appobjects are registered using the wrong objid.
> 
> This is particularly problematic in register_and_replace function of
> registries which relies on the objid of appobjects to find which object
> to replace.
> 
> diff --git a/cubicweb_seda/dataimport.py b/cubicweb_seda/dataimport.py
> --- a/cubicweb_seda/dataimport.py
> +++ b/cubicweb_seda/dataimport.py
> @@ -30,7 +30,7 @@ from cubicweb.dataimport.importer import
>      cwuri2eid,
>  )
>  
> -from cubes.skos import lcsv, sobjects as skos
> +from cubicweb_skos import lcsv, sobjects as skos
>  
>  # If you want to add a vocabulary here, add it to the end of the list if you
>  # want to create it in migration script by simply calling import_seda_schemes
> diff --git a/cubicweb_seda/schema/__init__.py b/cubicweb_seda/schema/__init__.py
> --- a/cubicweb_seda/schema/__init__.py
> +++ b/cubicweb_seda/schema/__init__.py
> @@ -21,7 +21,7 @@ from yams.buildobjs import String
>  from cubicweb import _
>  from cubicweb.schema import ERQLExpression, RRQLExpression, RQLConstraint
>  
> -from cubes.skos import schema as skos
> +from cubicweb_skos import schema as skos
>  
>  from .xsd2yams import MULTIPLE_CHILDREN
>  
> diff --git a/cubicweb_seda/views/dataobject.py b/cubicweb_seda/views/dataobject.py
> --- a/cubicweb_seda/views/dataobject.py
> +++ b/cubicweb_seda/views/dataobject.py
> @@ -26,7 +26,7 @@ from cubicweb.predicates import match_fo
>  from cubicweb.web.views import uicfg, tabs, ibreadcrumbs
>  
>  from cubes.relationwidget import views as rwdg
> -from cubes.skos.views import widgets as skos
> +from cubicweb_skos.views import widgets as skos
>  
>  from ..xsd2yams import SCHEME_FROM_CONTAINER
>  from ..entities import parent_and_container, simplified_profile, full_seda2_profile
> 



More information about the saem-devel mailing list