Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
jspetrak committed Sep 23, 2023
1 parent dbb92d5 commit 1a4ca7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions django_nuts/loaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def load_lau(*country_codes):
country_codes = (key for key in data.keys() if len(key) == 2)
for country_code in country_codes:
sheet = data[country_code]
nuts = {n.code: n for n in NUTS.objects.filter(code__startswith=country_code).iterator()}
laus = {l.code: l for l in LAU.objects.filter(code__startswith=country_code).iterator()}
nuts = {n_nuts.code: n_nuts for n_nuts in NUTS.objects.filter(code__startswith=country_code).iterator()}
laus = {l_lau.code: l_lau for l_lau in LAU.objects.filter(code__startswith=country_code).iterator()}
created, updated = 0, 0
for row in sheet[1:]:
# handle exceptions in data
Expand Down
4 changes: 2 additions & 2 deletions django_nuts/loaders/cz_nuts4_lau.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def load_cz_nuts4_lau():
# take last sheet
sheet = data[list(data.keys())[-1]]

nuts = {n.code: n for n in NUTS.objects.filter(code__startswith='CZ').iterator()}
laus = {l.code: l for l in LAU.objects.filter(code__startswith='CZ').iterator()}
nuts = {n_nuts.code: n_nuts for n_nuts in NUTS.objects.filter(code__startswith='CZ').iterator()}
laus = {l_lau.code: l_lau for l_lau in LAU.objects.filter(code__startswith='CZ').iterator()}
nuts_created, nuts_updated, lau_created, lau_updated = 0, 0, 0, 0
for row in sheet[2:]:
lau_code, lau_name = row[0:2]
Expand Down

0 comments on commit 1a4ca7f

Please sign in to comment.