Skip to content

Commit

Permalink
fix: change local and metro id to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
keonly committed Nov 27, 2023
1 parent dd10040 commit 05e1733
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions API/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def save_to_mongo(data: List[dict], sgTypecode: str, where: str) -> None:
main_collection.update_one(
{
"name": entry["name"],
"local_id": district_id["local_id"],
"metro_id": district_id["metro_id"],
"localId": district_id["localId"],
"metroId": district_id["metroId"],
},
{"$set": Councilor.from_dict(entry).to_dict()},
upsert=True,
Expand All @@ -65,8 +65,8 @@ def save_to_mongo(data: List[dict], sgTypecode: str, where: str) -> None:
main_collection.update_one(
{
"name": entry["name"],
"local_id": 0,
"metro_id": 0,
"localId": 0,
"metroId": 0,
},
{"$set": Councilor.from_dict(entry).to_dict()},
upsert=True,
Expand Down Expand Up @@ -102,8 +102,8 @@ def getLocalMetroMap() -> Dict[str, str]:
)
return {
(item["sdName"], item["wiwName"]): {
"local_id": item["localId"],
"metro_id": item["metroId"],
"localId": item["localId"],
"metroId": item["metroId"],
}
for item in result
}
Expand Down

0 comments on commit 05e1733

Please sign in to comment.