[PATCH seda] [schema] Update Label.language_code max size

Sylvain Thenault sylvain.thenault at logilab.fr
Wed Jul 19 11:39:47 CEST 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1500454276 -7200
#      Wed Jul 19 10:51:16 2017 +0200
# Node ID 099c8a8e54b068dd84f49593c3f0e211de9b1dce
# Parent  3febc73ffa1bd9a7e45ce7585968b7ec0ac0a38e
# Available At https://hg.logilab.org/review/cubes/seda
#              hg pull https://hg.logilab.org/review/cubes/seda -r 099c8a8e54b0
[schema] Update Label.language_code max size

6 is not enough to hold 'seda-02', move to 7.

diff --git a/cubicweb_seda/migration/0.10.5_Any.py b/cubicweb_seda/migration/0.10.5_Any.py
new file mode 100644
--- /dev/null
+++ b/cubicweb_seda/migration/0.10.5_Any.py
@@ -0,0 +1,1 @@
+sync_schema_props_perms('language_code')
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
@@ -148,11 +148,11 @@ class compat_list(RelationDefinition):
     object = 'String'
     description = _("names of format in which the profile may be exported (e.g. 'SEDA 2, SEDA 1')")
 
 
 language_code = skos.Label.get_relation('language_code')
-language_code.constraints[0].max = 6
+language_code.constraints[0].max = 7
 # XXX code below may be dropped once https://www.cubicweb.org/ticket/14037638 is released
 language_code.indexed = True
 kind = skos.Label.get_relation('kind')
 kind.indexed = True
 


More information about the saem-devel mailing list