Skip to content

Commit

Permalink
tasotarkistus: update import function to match latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NC-jsAhonen committed Nov 22, 2024
1 parent 0c07b8e commit 4504ef8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,17 @@ 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?
_, created = IndexNumberYearly.objects.update_or_create(
index=index,
year=year,
defaults={
"number": number,
"point_figure": point_figure,
"region": region,
"comment": comment,
},
Expand Down

0 comments on commit 4504ef8

Please sign in to comment.