From f1eb0cad6beae19bbdf20fa84f7d2550e33357b2 Mon Sep 17 00:00:00 2001 From: Anders Nord Date: Fri, 26 Apr 2024 23:28:37 +0200 Subject: [PATCH] add another sort to be safe --- src/smhi/metobs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/smhi/metobs.py b/src/smhi/metobs.py index 4fff90c..c215657 100644 --- a/src/smhi/metobs.py +++ b/src/smhi/metobs.py @@ -324,6 +324,7 @@ def __init__( super().__init__() if period == "not-set": + periods_in_station = sorted(periods_in_station, key=lambda x: x.key) period = periods_in_station.data[0] if data_type != "json":