Skip to content

Commit

Permalink
specify category of area types
Browse files Browse the repository at this point in the history
  • Loading branch information
janbaykara committed Jan 5, 2025
1 parent 03b8beb commit e44f911
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hub/data_imports/geocoding_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ async def import_area_data(
parent_area = area
literal_lih_area_type__code = item.get("lih_area_type__code", None)
literal_mapit_type = item.get("mapit_type", None)
area_set = "LIH" if literal_lih_area_type__code is not None else "MapIt"
area_types = literal_lih_area_type__code or literal_mapit_type
literal_area_field = item.get("field", None)
raw_area_value = str(source.get_record_field(record, literal_area_field))
Expand Down Expand Up @@ -274,7 +275,7 @@ async def import_area_data(

step = {
"type": "sql_area_matching",
"area_types": parsed_area_types,
f"{area_set}_area_types": parsed_area_types,
"result": "failed" if area is None else "success",
"search_term": raw_area_value,
"data": (
Expand Down

0 comments on commit e44f911

Please sign in to comment.