Skip to content

Commit

Permalink
fix(export): Filtered author export based on Country
Browse files Browse the repository at this point in the history
Signed-off-by: Lorenzo Vagliano
  • Loading branch information
Lorenzovagliano committed Nov 13, 2024
1 parent 236aa07 commit cddba18
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions scoap3/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,22 +136,22 @@ def author_export(search_year, search_country):
for affiliation in author.affiliations:
if not affiliation.country:
aff_country = "UNKNOWN"
else:
elif affiliation.country.code == search_country:
aff_country = affiliation.country.code
aff_value = affiliation.get("value", "UNKNOWN")
result_data.append(
[
year,
journal,
doi,
arxiv,
arxiv_category,
author_first_name + " " + author_last_name,
aff_country,
aff_value,
total_authors,
]
)
aff_value = affiliation.get("value", "UNKNOWN")
result_data.append(
[
year,
journal,
doi,
arxiv,
arxiv_category,
author_first_name + " " + author_last_name,
aff_country,
aff_value,
total_authors,
]
)

if missing_author_affiliations:
logger.warn(
Expand Down

0 comments on commit cddba18

Please sign in to comment.