Skip to content

Commit c875b02

Browse files
committed
Fix for handling empty idlist
1 parent 0eb7222 commit c875b02

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)