Skip to content

Commit 98a1cd6

Browse files
authored
Merge pull request #144 from monarch-initiative/caufieldjh/issue143
Fix for handling empty idlist
2 parents 0eb7222 + c875b02 commit 98a1cd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/curategpt/wrappers/literature/pubmed_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def external_search(
128128
data = response.json()
129129

130130
# Extract PubMed IDs from the response
131-
if "esearchresult" not in data:
131+
if "esearchresult" not in data or "idlist" not in data["esearchresult"]:
132132
logger.error(f"Failed to find results for {text}")
133133
logger.error(f"Data: {data}")
134134
return []

0 commit comments

Comments
 (0)