From be8cac2be49b44a8a1c600dacc1c47c42f12ffc1 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 17 Dec 2020 16:27:53 +0100 Subject: check doi existence --- fuzzycat/verify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py index 1cf8f3c..00d76ba 100644 --- a/fuzzycat/verify.py +++ b/fuzzycat/verify.py @@ -158,7 +158,9 @@ def verify(a: Dict, b: Dict, min_title_length=5) -> Tuple[str, str]: # A few items have the same DOI. try: - if glom(a, "ext_ids.doi") == glom(b, "ext_ids.doi"): + a_doi = glom(a, "ext_ids.doi") + b_doi = glom(b, "ext_ids.doi") + if a_doi is not None and a_doi == b_doi: return Verify(Status.EXACT, Reason.DOI) except PathAccessError: pass -- cgit v1.2.3