Skip to content

Commit

Permalink
Merge pull request #652 from gisce/bugfix/58775_index_error_when_no_f…
Browse files Browse the repository at this point in the history
…echa_aps_bt

FIX comparar fecha de obra con fecha aps inexistente en elementos BT
  • Loading branch information
ecarreras authored May 8, 2024
2 parents 2000899 + 54fe705 commit 1a213ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libcnmc/cir_8_2021/FB1.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,9 @@ def get_inst_name(element_id):
# CAMPS OBRA
if linia_obra != '':
obra_year = data_finalitzacio.split('-')[0]
data_pm_year = fecha_aps.split('/')[2]
data_pm_year = (
fecha_aps and fecha_aps.split('/')[2] or ''
)
if linia_obra['tipo_inversion'] != '0' and obra_year != data_pm_year:
data_ip = convert_spanish_date(data_finalitzacio)
else:
Expand Down

0 comments on commit 1a213ee

Please sign in to comment.