Skip to content

Commit 37885c6

Browse files
committed
Small update to author_search.
1 parent 961ba1e commit 37885c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/academic_tracker/athr_srch_webio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def search_PubMed_for_pubs(prev_pubs, authors_json, from_email):
6565
for pub in publications:
6666

6767
pub_id = DOI_URL + pub.doi if pub.doi else pub.pubmed_id.split("\n")[0]
68+
## Sometimes the publication_date can be None, so just skip it.
69+
if not pub.publication_date:
70+
continue
6871
publication_date = int(str(pub.publication_date)[:4])
6972

7073
## if the publication id is in prev_pubs or publication_dict or the publication date is before the curoff year then skip.

0 commit comments

Comments
 (0)