summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/importers/dblp_release.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/dblp_release.py b/python/fatcat_tools/importers/dblp_release.py
index 6cf7037b..9cebcdc2 100644
--- a/python/fatcat_tools/importers/dblp_release.py
+++ b/python/fatcat_tools/importers/dblp_release.py
@@ -338,15 +338,19 @@ class DblpReleaseImporter(EntityImporter):
self.counts["exists-fuzzy"] += 1
return False
- # create entity
+ # if no existing, then create entity
if not existing:
return True
- # other logic could go here about skipping updates
if not self.do_updates or existing.ext_ids.dblp:
self.counts['exists'] += 1
return False
+ # logic for whether to do update or skip
+ if (existing.container_id and existing.release_type and existing.release_stage) or existing.ext_ids.arxiv_id:
+ self.counts['skip-update'] += 1
+ return False
+
# fields to copy over for update
# TODO: granular contrib metadata
existing.contribs = existing.contribs or re.contribs