Skip to content

Commit

Permalink
Made sure that the sorting of rooms_tumonline.json is more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm authored May 1, 2024
1 parent 7aa88ed commit aa3dd16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/external/scrapers/tumonline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit aa3dd16

Please sign in to comment.