aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-19 11:29:01 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-19 11:29:01 +0100
commit1aeabbc26b78667d2600831acba81da1066943ec (patch)
tree51bb6218caf8ceb7a736c157b858cf493cb4057b
parentbf44318a9cf3c28c464e8d9f94e6819bdf305368 (diff)
downloadfuzzycat-1aeabbc26b78667d2600831acba81da1066943ec.tar.gz
fuzzycat-1aeabbc26b78667d2600831acba81da1066943ec.zip
verify: account for article/article-journal
-rw-r--r--fuzzycat/verify.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py
index bd40e6a..a644262 100644
--- a/fuzzycat/verify.py
+++ b/fuzzycat/verify.py
@@ -192,7 +192,10 @@ def compare(a, b):
if a.get("release_type") and b.get(
"release_type") and a.get("release_type") != b.get("release_type"):
- return (Status.DIFFERENT, Miss.RELEASE_TYPE)
+ # TODO: This can go wrong with "article" and "article-journal"
+ types = set([a.get("release_type"), b.get("release_type")])
+ if not ("article" in types and "article-journal" in types):
+ return (Status.DIFFERENT, Miss.RELEASE_TYPE)
if (a.get("release_type") == "dataset" and b.get("release_type") == "dataset"):
if (a.get("ext_ids", {}).get("doi") and b.get("ext_ids", {}).get("doi")