From 4467e63d6e79d47123db82cb37813361d5bb7529 Mon Sep 17 00:00:00 2001 From: Jukka Ahonen Date: Fri, 22 Nov 2024 08:41:19 +0000 Subject: [PATCH] tasotarkistus: update import function to match latest changes --- .../commands/import_periodic_rent_adjustment_index.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/leasing/management/commands/import_periodic_rent_adjustment_index.py b/leasing/management/commands/import_periodic_rent_adjustment_index.py index 82f6ca20..d7f1ad3c 100644 --- a/leasing/management/commands/import_periodic_rent_adjustment_index.py +++ b/leasing/management/commands/import_periodic_rent_adjustment_index.py @@ -316,7 +316,9 @@ def _update_or_create_index_numbers( for dp in data_points: year = int(dp["key"][year_key_pos]) - number = _cast_index_number_to_float_or_none(dp["values"][number_value_pos]) + point_figure = _cast_index_number_to_float_or_none( + dp["values"][number_value_pos] + ) region = dp["key"][region_key_pos] comment = _find_comment_for_value(dp, comments, columns) # TODO verify in 5.9. meeting: should we exclude "ennakkotieto" commented values? @@ -324,7 +326,7 @@ def _update_or_create_index_numbers( index=index, year=year, defaults={ - "number": number, + "point_figure": point_figure, "region": region, "comment": comment, },