Skip to content

Commit b652474

Browse files
authored
fix ridership widget in local dev instance (#1155)
1 parent cfc497e commit b652474

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

server/chalicelib/static_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_ridership(query_params: dict):
100100
Returns:
101101
A list of ridership records, or an empty list if no data is found.
102102
"""
103-
line_id = query_params.get("line_id", "line-red")
103+
line_id = query_params.get("line_id", "line-Red")
104104
data = _load_static_json(f"ridership/{line_id}.json")
105105
return data or []
106106

server/scripts/fetch_static_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
# Configuration for what data to fetch
2222
RAPID_TRANSIT_LINES = ["line-red", "line-blue", "line-orange", "line-green", "line-mattapan"]
23+
RAPID_TRANSIT_LINES_RIDERSHIP = ["line-Red", "line-Blue", "line-Orange", "line-Green", "line-Mattapan"]
2324
ROUTE_IDS = ["Red", "Blue", "Orange", "Green-B", "Green-C", "Green-D", "Green-E", "Mattapan"]
2425
DELAY_LINES = ["Red", "Blue", "Orange", "Green-B", "Green-C", "Green-D", "Green-E", "Mattapan"]
2526
AGG_TYPES = ["daily", "weekly", "monthly"]
@@ -80,7 +81,7 @@ def fetch_scheduled_service():
8081
def fetch_ridership():
8182
"""Fetch ridership data for all lines."""
8283
print("\n=== Fetching Ridership ===")
83-
for line in RAPID_TRANSIT_LINES:
84+
for line in RAPID_TRANSIT_LINES_RIDERSHIP:
8485
params = {
8586
"line_id": line,
8687
"start_date": START_DATE.isoformat(),

0 commit comments

Comments
 (0)