From 2055282df6bd39d5c81165c1fb711e70910dad52 Mon Sep 17 00:00:00 2001 From: Eduard Carreras Date: Fri, 5 Apr 2024 12:09:23 +0200 Subject: [PATCH] =?UTF-8?q?Arreglar=20si=20no=20tienen=20bolet=C3=ADn=20no?= =?UTF-8?q?=20falle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcnmc/cir_8_2021/FA1.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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