Skip to content

Commit

Permalink
Handle case where org_info is None
Browse files Browse the repository at this point in the history
  • Loading branch information
markbrough authored Nov 16, 2023
1 parent 178f99d commit d35c64c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def zip_discard_compr(*iterables, sentinel=None):
for dataset in iatikit.data().datasets.where(filetype='organisation'):
org_infos = orgidfinder.parse_org_file(dataset)
for org_info in org_infos:
if org_info is None: continue
org_info['org_type'] = guide._org_types.get(org_info['org_type_code'])
id_ = quote_plus(org_info['org_id'])
with open(Path(f'{output_dir}/data/{id_}.json'), 'w') as f:
Expand Down

0 comments on commit d35c64c

Please sign in to comment.