aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-23 18:39:24 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-23 18:39:24 -0700
commit613e8f6e58838ce7c81f6a1c05fe52bd9089f383 (patch)
treeebcac1f870f0a31faeecdc006b5d92d48dffbb63
parent9c0e5d714ea9fedeca64f1ceb5b47f67438629af (diff)
downloadchocula-613e8f6e58838ce7c81f6a1c05fe52bd9089f383.tar.gz
chocula-613e8f6e58838ce7c81f6a1c05fe52bd9089f383.zip
fix langs inclusion in summarization; remove unused/duplicate fields
-rw-r--r--chocula/database.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/chocula/database.py b/chocula/database.py
index 2fea774..54d3b60 100644
--- a/chocula/database.py
+++ b/chocula/database.py
@@ -139,7 +139,6 @@ class DirectoryInfo:
for k in (
"issne",
"issnp",
- "name",
"publisher",
"abbrev",
"platform",
@@ -495,7 +494,6 @@ class ChoculaDatabase:
extra = json.loads(irow["extra"])
for k in (
"country",
- "lang",
"issne",
"issnp",
"publisher",
@@ -503,6 +501,8 @@ class ChoculaDatabase:
):
if not out.get(k) and extra.get(k):
out[k] = extra[k]
+ if not out.get("lang") and extra.get("langs") and extra["langs"][0]:
+ out["lang"] = extra["langs"][0]
if irow["slug"] in ("doaj", "road", "szczepanski", "gold_oa"):
out["is_oa"] = True
if irow["slug"] == "ezb":