aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-04-09 10:20:48 -0500
committerFrederick Muriuki Muriithi2025-04-09 10:20:48 -0500
commita578770d6d6d8cfa755d113d95d0bad27b143110 (patch)
treee8e750582a1bbc75153160706e25d9e43989ceca /scripts
parentd490dccf4717c2817a2070f7354af18a6b5be825 (diff)
downloadgn-uploader-a578770d6d6d8cfa755d113d95d0bad27b143110.tar.gz
Check whether there are new PubMed IDs before beginning the fetch.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phenotypes_bulk_edit.py4
1 files changed, 4 insertions, 0 deletions
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))