[PATCH eac] [schema] `function_relation_function` and `resource_relation_resource` relations may have AuthorityRecord as object

Frank Bessou frank.bessou at logilab.fr
Thu Aug 29 17:24:11 CEST 2019


Applied this one as db9143b58296 thanks :)

On 29/08/2019 16:55, Guillaume Vandevelde wrote:
> # HG changeset patch
> # User Katia Saurfelt <katia.saurfelt at logilab.fr>
> # Date 1563899810 -7200
> #      Tue Jul 23 18:36:50 2019 +0200
> # Node ID 8de5035884a5abcba8345c4228982740d98c83a2
> # Parent  2d712be68b27aaa4fbccf8e66ae4f4f29a8d0df9
> # Available At http://hg.logilab.org/review/cubes/eac
> #              hg pull http://hg.logilab.org/review/cubes/eac -r 8de5035884a5
> [schema] `function_relation_function` and `resource_relation_resource` relations may have AuthorityRecord as object
> 
> diff -r 2d712be68b27 -r 8de5035884a5 cubicweb_eac/migration/0.9.0_Any.py
> --- a/cubicweb_eac/migration/0.9.0_Any.py	Fri Jul 12 17:48:06 2019 +0200
> +++ b/cubicweb_eac/migration/0.9.0_Any.py	Tue Jul 23 18:36:50 2019 +0200
> @@ -57,3 +57,9 @@
>   add_attribute('AuthorityRecord', 'languages')
>   
>   sync_schema_props_perms('record_id')
> +
> +add_relation_definition('EACResourceRelation', 'resource_relation_resource',
> +                        'AuthorityRecord')
> +
> +add_relation_definition('EACFunctionRelation', 'function_relation_function',
> +                        'AuthorityRecord')
> diff -r 2d712be68b27 -r 8de5035884a5 cubicweb_eac/schema.py
> --- a/cubicweb_eac/schema.py	Fri Jul 12 17:48:06 2019 +0200
> +++ b/cubicweb_eac/schema.py	Tue Jul 23 18:36:50 2019 +0200
> @@ -456,7 +456,7 @@
>   
>   class function_relation_function(RelationDefinition):
>       subject = 'EACFunctionRelation'
> -    object = 'ExternalUri'
> +    object = ('AuthorityRecord', 'ExternalUri')
>       cardinality = '?*'
>       inlined = True
>   
> @@ -489,7 +489,7 @@
>   
>   class resource_relation_resource(RelationDefinition):
>       subject = 'EACResourceRelation'
> -    object = 'ExternalUri'
> +    object = ('AuthorityRecord', 'ExternalUri')
>       cardinality = '1*'
>       inlined = True
>   
> 

-- 
Frank Bessou
Logilab         https://www.logilab.fr



More information about the saem-devel mailing list