Skip to content

Commit

Permalink
Merge pull request #37 from gisce/fix_codi_tipus_lectura
Browse files Browse the repository at this point in the history
Al parsear el atributo codigoTipoLectura del ficheros de consumos de gas fallaba
  • Loading branch information
eberloso authored Aug 14, 2024
2 parents 16c42fc + f86fb5f commit 6f903ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sippers/models/cnmc_gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
codigoTipoLectura = fields.String(validate=OneOf(TAULA_TIPO_LECTURA_GAS), position=10, required=False, allow_none=True)
1 change: 1 addition & 0 deletions sippers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

0 comments on commit 6f903ec

Please sign in to comment.