From aa3dd16cad6d89f3f0be228c631cfeeec07302ee Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 1 May 2024 15:40:28 +0200 Subject: [PATCH] Made sure that the sorting of `rooms_tumonline.json` is more stable --- data/external/scrapers/tumonline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/external/scrapers/tumonline.py b/data/external/scrapers/tumonline.py index cf63e1ac1..6520bed27 100644 --- a/data/external/scrapers/tumonline.py +++ b/data/external/scrapers/tumonline.py @@ -147,7 +147,7 @@ def scrape_rooms() -> None: rooms.append(room_index[roomcode]) usage_id += 1 - rooms = sorted(rooms, key=lambda r: (r["list_index"], r["roomcode"])) + rooms = sorted(rooms, key=lambda r: (r["roomcode"],r["list_index"])) with open(CACHE_PATH / "rooms_tumonline.json", "w", encoding="utf-8") as file: json.dump(rooms, file, indent=2, sort_keys=True)