Commit 003f4446 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update harvest to restore controller insert_recjson

parent fae5d9e3
...@@ -360,9 +360,15 @@ def insert_recjson(): ...@@ -360,9 +360,15 @@ def insert_recjson():
tool.harvester.host = selector.host tool.harvester.host = selector.host
tool.logs = [] tool.logs = []
tool.shelf = \
("literature" if selector.host == "inspirehep.net" else None)
recjson = json.loads(selector.recjson) recjson = json.loads(selector.recjson)
recjson = (recjson[0] if isinstance(recjson, list) else recjson) recjson = (recjson[0] if isinstance(recjson, list) else recjson)
if selector.host == "inspirehep.net":
recjson = recjson["metadata"]
tool.process_recjson(recjson) tool.process_recjson(recjson)
except ToolException as e: except ToolException as e:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment