Skip to content

Commit 335f032

Browse files
authored
fix(entsoe-e): fix index out of range error (#8483)
1 parent 7880e80 commit 335f032

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

electricitymap/contrib/parsers/ENTSOE.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,11 +813,12 @@ def _reverse_A3_curve_compression_for_period(
813813
Reverses the A3 curve compression for a *single* Period object.
814814
Fills in missing points with the last known value.
815815
"""
816-
if not period.points:
817-
return
818816

819817
points_list = sorted(period.points, key=attrgetter("position"))
820818

819+
if not points_list:
820+
return
821+
821822
start_time = period.datetime_start
822823
end_time = period.datetime_end
823824
resolution = period.resolution

0 commit comments

Comments
 (0)