aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r--python/fatcat_tools/importers/pubmed.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/pubmed.py b/python/fatcat_tools/importers/pubmed.py
index 1246bf6b..9a9849ed 100644
--- a/python/fatcat_tools/importers/pubmed.py
+++ b/python/fatcat_tools/importers/pubmed.py
@@ -401,8 +401,10 @@ class PubmedImporter(EntityImporter):
release_type = "retraction"
retraction_of = medline.find("CommentsCorrections", RefType="RetractionOf")
if retraction_of:
- extra_pubmed['retraction_of_raw'] = retraction_of.RefSource.string
- extra_pubmed['retraction_of_pmid'] = retraction_of.PMID.string
+ if retraction_of.RefSource:
+ extra_pubmed['retraction_of_raw'] = retraction_of.RefSource.string
+ if retraction_of.PMID:
+ extra_pubmed['retraction_of_pmid'] = retraction_of.PMID.string
# everything in medline is published
release_stage = "published"