diff --git a/gestionatr/input/messages/F1.py b/gestionatr/input/messages/F1.py index 64dbf79..2db28c4 100644 --- a/gestionatr/input/messages/F1.py +++ b/gestionatr/input/messages/F1.py @@ -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]