Skip to content

Commit

Permalink
fix etryvoga distract parser
Browse files Browse the repository at this point in the history
  • Loading branch information
v00g100skr committed Oct 9, 2024
1 parent 0d1ad5f commit b7f157d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions deploy/etryvoga/etryvoga.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ async def districts_data(mc):

def make_districts_struct(data):
struct = {}
for district in data:
district_slug = district["slug"]
struct[district_slug] = district_slug
for city in district["cities"]:
struct[city["slug"]] = district_slug
for area in data:
area_slug = area["slug"]
struct[area_slug] = area_slug
for district in area["districts"]:
struct[district["slug"]] = area_slug
for city in district["cities"]:
struct[city["slug"]] = area_slug

return struct

Expand Down

0 comments on commit b7f157d

Please sign in to comment.