[saem-devel] [PATCH 2 of 2 V2] [schema] Backport some unreleased fixes from eac schema

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Jan 31 10:44:35 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1485812056 -3600
#      Mon Jan 30 22:34:16 2017 +0100
# Node ID 308cb0b011d001a491060c0b025ced7b45bfbf01
# Parent  8abe94bd44cd242035b9fdd4f5ad64a7ca225fa1
[schema] Backport some unreleased fixes from eac schema

diff --git a/cubicweb_saem_ref/schema.py b/cubicweb_saem_ref/schema.py
--- a/cubicweb_saem_ref/schema.py
+++ b/cubicweb_saem_ref/schema.py
@@ -24,11 +24,11 @@ from cubicweb.schema import (RO_ATTR_PER
                              RQLConstraint, RQLVocabularyConstraint, WorkflowableEntityType,
                              make_workflowable)
 from cubicweb.schemas.base import ExternalUri, EmailAddress
 
 from cubes.skos.schema import ConceptScheme
-from cubes.eac.schema import AuthorityRecord
+from cubes.eac.schema import AuthorityRecord, NameEntry
 from cubes.seda.schema import simplified_profile
 from cubes.seda.schema.seda2 import SEDAArchiveTransfer
 
 from . import PERMISSIONS_GRAPHS, optional_relations, mandatory_rdefs
 
@@ -126,10 +126,14 @@ EmailAddress.remove_relation('alias')
 
 
 # Customization of eac schema.
 make_workflowable(AuthorityRecord)
 groups_permissions(AuthorityRecord)
+# XXX those can be removed once we depend on eac > 0.3
+NameEntry.get_relation('form_variant').internationalizable = True
+NameEntry.get_relation('form_variant').default = u'authorized'
+
 
 # Customization of skos schema.
 make_workflowable(ConceptScheme)
 publication_permissions(ConceptScheme)
 


More information about the saem-devel mailing list