Skip to content

Commit

Permalink
Merge pull request #261 from gisce/fix_lectures_activa_entrant_from_c…
Browse files Browse the repository at this point in the history
…omptador_gc

Permitir obtener lecturas del F1 si el CG tiene mas periodos que la tarifa del contrato
  • Loading branch information
eberloso authored Nov 27, 2024
2 parents 9912d43 + 46d8ba2 commit 80449bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gestionatr/input/messages/F1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,8 +2000,11 @@ def get_lectures_amb_periodes_td(self, lectures, tipus):
base_lectura = None
for l in lectures:
if l.tipus == tipus:
lectures_per_periode[l.periode].append(l)
base_lectura = l
# Mandanga (Puta Fenosa) En cas que ens arribin lectures de periodes fora de la tarifa del contracte
# ignorem les lectures dels periodes que estiguin fora de la tarifa ATR del contracte
if l.periode in lectures_per_periode.keys():
lectures_per_periode[l.periode].append(l)
base_lectura = l

if not base_lectura:
return [x for x in lectures if x.tipus == tipus]
Expand Down

0 comments on commit 80449bc

Please sign in to comment.