diff --git a/sippers/models/cnmc_gas.py b/sippers/models/cnmc_gas.py index 0830aa8..617a515 100644 --- a/sippers/models/cnmc_gas.py +++ b/sippers/models/cnmc_gas.py @@ -2,7 +2,7 @@ from marshmallow import Schema, fields from marshmallow.validate import OneOf -from sippers.utils import TAULA_PROPIEDAD_CONTADOR_CORRECTOR, TAULA_RESULTADO_INSPECCION, TAULA_PERFIL_CONSUMO, TAULA_TIPO_PEAJE, TAULA_TIPO_LECTURA +from sippers.utils import TAULA_PROPIEDAD_CONTADOR_CORRECTOR, TAULA_RESULTADO_INSPECCION, TAULA_PERFIL_CONSUMO, TAULA_TIPO_PEAJE, TAULA_TIPO_LECTURA_GAS class CnmcGasSipsSchema(Schema): @@ -76,4 +76,4 @@ class CnmcGasMeasuresSchema(Schema): caudaMinimoDiario = fields.String(position=7, required=False, allow_none=True) caudaMaximoDiario = fields.String(position=8, required=False, allow_none=True) porcentajeConsumoNocturno = fields.String(position=9, required=False, allow_none=True) - codigoTipoLectura = fields.String(validate=OneOf(TAULA_TIPO_LECTURA), position=10, required=False, allow_none=True) \ No newline at end of file + codigoTipoLectura = fields.String(validate=OneOf(TAULA_TIPO_LECTURA_GAS), position=10, required=False, allow_none=True) \ No newline at end of file diff --git a/sippers/utils.py b/sippers/utils.py index 5054909..e7ac46a 100644 --- a/sippers/utils.py +++ b/sippers/utils.py @@ -73,4 +73,5 @@ def build_dict(headers, data): TAULA_RESULTADO_INSPECCION = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14'] TAULA_PERFIL_CONSUMO = ['01', '02'] TAULA_TIPO_PEAJE = ['11', '12', '13', '21', '22', '23', '24', '25', '26', '1B', '2B', '3B', '4B', '5B', '6B', '31', '32', '33', '34', '35', '41', '42', '43', '44', '45', '46', '47', 'A1', 'A2', 'A3', 'B1', 'B2', 'C1', 'C2', 'D1', 'D2', 'M1', 'M2', 'R1', 'R2', 'R3', 'R4', 'R8', 'R9', 'L0', 'L1', 'A5', 'A6', 'A7', 'B5', 'B6', 'B7', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6', 'S7', 'S8', '99'] +TAULA_TIPO_LECTURA_GAS = ['R', 'E'] # R: real, E: estimada TAULA_TIPO_LECTURA = ['0', '1', '2'] \ No newline at end of file