summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/fatcat_tools/cleanups/release_lowercase_doi.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/fatcat_tools/cleanups/release_lowercase_doi.py b/python/fatcat_tools/cleanups/release_lowercase_doi.py
index 812262d4..4e5a6f43 100644
--- a/python/fatcat_tools/cleanups/release_lowercase_doi.py
+++ b/python/fatcat_tools/cleanups/release_lowercase_doi.py
@@ -1,13 +1,10 @@
import argparse
-import copy
import os
import sys
-from typing import Any, Dict
-import fatcat_openapi_client
from fatcat_openapi_client import ApiClient, ReleaseEntity, ReleaseExtIds
-from fatcat_tools import authenticated_api, entity_from_dict, public_api
+from fatcat_tools import authenticated_api, public_api
from fatcat_tools.importers.common import EntityImporter, LinePusher
@@ -76,6 +73,10 @@ class ReleaseLowercaseDoiCleanup(EntityImporter):
self.counts["skip-existing-not-found"] += 1
return False
+ if existing.status != "active":
+ self.counts["skip-existing-entity-status"] += 1
+ return False
+
if not existing.ext_ids.doi:
self.counts["skip-existing-no-doi"] += 1
return False