Skip to content

Commit

Permalink
parsing: Unset admin3 for Mexico
Browse files Browse the repository at this point in the history
  • Loading branch information
abhidg committed Jun 23, 2021
1 parent 112ecb5 commit 943d9ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions ingestion/functions/parsing/mexico/mexico.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def convert_location(state_code: str, municipality_code: str):
try:
query_list.append(_MUNICIPALITIES[state_code + municipality_code])
except KeyError:
print(f"Municipality code missing: {municipality_code}")
print(f"Municipality code missing: {state_code} {municipality_code}")
if state_code[0] != missing_value_prefix:
try:
query_list.append(_STATES[state_code])
Expand All @@ -51,7 +51,6 @@ def convert_location(state_code: str, municipality_code: str):
return {
"administrativeAreaLevel1": _STATES[state_code],
"administrativeAreaLevel2": _MUNICIPALITIES[municipality_code],
"administrativeAreaLevel3": _MUNICIPALITIES[municipality_code],
"geoResolution": "Admin2",
"country": "Mexico",
"name": query_string,
Expand Down
1 change: 0 additions & 1 deletion ingestion/functions/parsing/mexico/mexico_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"location": {
"administrativeAreaLevel1": "MÉXICO",
"administrativeAreaLevel2": 'ATIZAPÁN DE ZARAGOZA',
"administrativeAreaLevel3": 'ATIZAPÁN DE ZARAGOZA',
"country": "Mexico",
"geoResolution": "Admin2",
"geometry": {"latitude": 19.56480728, "longitude": -99.27404399},
Expand Down

0 comments on commit 943d9ae

Please sign in to comment.