From a578770d6d6d8cfa755d113d95d0bad27b143110 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 9 Apr 2025 10:20:48 -0500 Subject: Check whether there are new PubMed IDs before beginning the fetch. --- scripts/phenotypes_bulk_edit.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/phenotypes_bulk_edit.py b/scripts/phenotypes_bulk_edit.py index b647199..c0174be 100644 --- a/scripts/phenotypes_bulk_edit.py +++ b/scripts/phenotypes_bulk_edit.py @@ -107,6 +107,10 @@ def __fetch_new_pubmed_ids__(pubmed_ids): # See whether we can retrieve multiple publications in one go # Parse data and save to DB # Return PublicationId(s) for new publication(s). + if len(pubmed_ids) == 0: + logger.debug("There are no new PubMed IDs to fetch") + return tuple() + logger.info("Fetching publications data for the following PubMed IDs: %s", ", ".join(pubmed_ids)) -- cgit v1.2.3