facho/fe/data/codelist: se adiciona metodo CodeList.update.
FossilOrigin-Name: 2fd2938037f8de0e95e5cea0d9328edb06c14d8ec55fd0ce868141c7298424bd
This commit is contained in:
parent
3c6c87f3c0
commit
d35583d6d2
@ -56,6 +56,11 @@ class CodeList:
|
|||||||
return v
|
return v
|
||||||
raise KeyError
|
raise KeyError
|
||||||
|
|
||||||
|
def update(self, other):
|
||||||
|
for k, v in other.rows.items():
|
||||||
|
self.rows[k] = v
|
||||||
|
return self
|
||||||
|
|
||||||
# nombres de variables igual a ./Identification/ShortName
|
# nombres de variables igual a ./Identification/ShortName
|
||||||
# TODO: garantizar unica carga en python
|
# TODO: garantizar unica carga en python
|
||||||
|
|
||||||
@ -70,7 +75,8 @@ def path_for_codelist(name):
|
|||||||
return os.path.join(DATA_DIR, name)
|
return os.path.join(DATA_DIR, name)
|
||||||
|
|
||||||
TipoOrganizacion = CodeList(path_for_codelist('TipoOrganizacion-2.1.gc'), 'code', 'name')
|
TipoOrganizacion = CodeList(path_for_codelist('TipoOrganizacion-2.1.gc'), 'code', 'name')
|
||||||
TipoResponsabilidad = CodeList(path_for_codelist('TipoResponsabilidad-2.1.gc'), 'code', 'name')
|
TipoResponsabilidad = CodeList(path_for_codelist('TipoResponsabilidad-2.1.gc'), 'code', 'name')\
|
||||||
|
.update(CodeList(path_for_codelist('TipoResponsabilidad-2.1.custom.gc'), 'code', 'name'))
|
||||||
TipoAmbiente = CodeList(path_for_codelist('TipoAmbiente-2.1.gc'), 'code', 'name')
|
TipoAmbiente = CodeList(path_for_codelist('TipoAmbiente-2.1.gc'), 'code', 'name')
|
||||||
TipoDocumento = CodeList(path_for_codelist('TipoDocumento-2.1.gc'), 'code', 'name')
|
TipoDocumento = CodeList(path_for_codelist('TipoDocumento-2.1.gc'), 'code', 'name')
|
||||||
CodigoPrecioReferencia = CodeList(path_for_codelist('CodigoPrecioReferencia-2.1.gc'), 'code', 'name')
|
CodigoPrecioReferencia = CodeList(path_for_codelist('CodigoPrecioReferencia-2.1.gc'), 'code', 'name')
|
||||||
|
Loading…
Reference in New Issue
Block a user