Skip to content

Commit

Permalink
Merge pull request #651 from gisce/bugfix/58778_index_error_when_no_f…
Browse files Browse the repository at this point in the history
…echa_aps

FIX comparar fecha de obra con fecha aps inexistente
  • Loading branch information
ecarreras authored May 8, 2024
2 parents 6f0916e + be202ef commit 3cbe002
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 @@ -320,7 +320,9 @@ def get_inst_name(element_id):
# CAMPS OBRA
if tram_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 tram_obra['tipo_inversion'] != '0' and obra_year != data_pm_year:
data_ip = convert_spanish_date(data_finalitzacio)
else:
Expand Down

0 comments on commit 3cbe002

Please sign in to comment.