From b289da087453f13571c5570d6be4a3fb4ac08acd Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 6 Jan 2020 16:54:30 -0800 Subject: importers: control update behavior with more-standard flag --- python/fatcat_tools/importers/pubmed.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/fatcat_tools/importers/pubmed.py') 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 -- cgit v1.2.3