Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprovar que tenemos todas las variables, para prevenir division por 0 #254

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gestionatr/input/messages/B70.py
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ def get_lectures_info(self):
# ultima lectura
# Per tant: si el consum facturat per la distri no coincideix amb el consum calculat, ero aplicant
# el faactor de conversio del ultim dia siq ue aplica, recalculem el factor k perque quadri tot.
if consum_kwh_facturat != consum_calculat_segons_factor and vals['pcs']:
if consum_kwh_facturat != consum_calculat_segons_factor and vals['pcs'] and vals['consum_m3']:
if not factor_ultima_lectura and self.meters[-1].factorconver:
factor_ultima_lectura = float(self.meters[-1].factorconver)
if factor_ultima_lectura:
Expand Down
Loading