diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-01-06 16:54:30 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-01-06 16:54:30 -0800 |
commit | b289da087453f13571c5570d6be4a3fb4ac08acd (patch) | |
tree | 2dc3a46afa072be3a248d2115cf02f5dcbb7253c /python/fatcat_tools/importers/pubmed.py | |
parent | 3a57c35ddcf794d7211d1649e74a9917bd1c9495 (diff) | |
download | fatcat-b289da087453f13571c5570d6be4a3fb4ac08acd.tar.gz fatcat-b289da087453f13571c5570d6be4a3fb4ac08acd.zip |
importers: control update behavior with more-standard flag
Diffstat (limited to 'python/fatcat_tools/importers/pubmed.py')
-rw-r--r-- | python/fatcat_tools/importers/pubmed.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_tools/importers/pubmed.py b/python/fatcat_tools/importers/pubmed.py index 3611a299..c32ce34a 100644 --- a/python/fatcat_tools/importers/pubmed.py +++ b/python/fatcat_tools/importers/pubmed.py @@ -715,6 +715,10 @@ class PubmedImporter(EntityImporter): re.ext_ids.doi = None re.work_id = existing.work_id + if existing and not self.do_updates: + self.counts['exists'] += 1 + return False + if existing and existing.ext_ids.pmid and (existing.refs or not re.refs): # TODO: any other reasons to do an update? # don't update if it already has PMID |