Skip to content

Commit

Permalink
Account for empty ORCIDs in rialto-orgs authors file
Browse files Browse the repository at this point in the history
  • Loading branch information
lwrubel committed Jun 20, 2024
1 parent e614313 commit 9135ca3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rialto_airflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ def rialto_authors_orcids(rialto_authors_file):
header = next(reader)
orcidid = header.index("orcidid")
for row in reader:
orcids.append(row[orcidid])
if row[orcidid]:
orcids.append(row[orcidid])
return orcids
3 changes: 2 additions & 1 deletion test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def authors_csv(tmp_path):
writer = csv.writer(csvfile)
writer.writerow(["sunetid", "orcidid"])
writer.writerow(["author1", "https://orcid.org/0000-0000-0000-0001"])
writer.writerow(["author2", "https://orcid.org/0000-0000-0000-0002"])
writer.writerow(["author2", ""])
writer.writerow(["author3", "https://orcid.org/0000-0000-0000-0002"])
return fixture_file


Expand Down

0 comments on commit 9135ca3

Please sign in to comment.