diff --git a/libcnmc/cir_8_2021/FA1.py b/libcnmc/cir_8_2021/FA1.py index 98e0b427..8ae6fcd3 100644 --- a/libcnmc/cir_8_2021/FA1.py +++ b/libcnmc/cir_8_2021/FA1.py @@ -726,10 +726,11 @@ def consumer(self): '&', ('data', '=', False), ('data_vigencia', '>=', current_date), '&', ('data', '<=', current_date), ('data_vigencia', '>=', current_date), ], 0, 0, False, {'active_test': False}) - o_pot_ads = max( - b['pot_max_admisible'] - for b in self.connection.GiscedataButlleti.read(but_ids, ['pot_max_admisible']) - ) + if but_ids: + o_pot_ads = max( + b['pot_max_admisible'] + for b in self.connection.GiscedataButlleti.read(but_ids, ['pot_max_admisible']) + ) if o_pot_ads < o_potencia: o_pot_ads = o_potencia