Commit 5742c84e authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update store_tools/factory.py to the new inspireh API

parent a54c3941
......@@ -323,10 +323,7 @@ def get_conference_data(host, conf_id=None, key=None):
# search by id in inspirehep.net
#
if conf_id is not None and host in INS:
obj = store.get_record(conf_id)
if obj["id"] != str(conf_id):
raise CdsException(MSG_INV_CONF)
return obj["metadata"]
return store.get_record(conf_id)
# ........................................................................
#
......@@ -338,7 +335,7 @@ def get_conference_data(host, conf_id=None, key=None):
if not REG_CONF.match(key):
raise CdsException(MSG_INV_CONF_KEY)
obj = store.search(f"cnum:{key}")
obj = store.search(q=f"cnum:{key}")
try:
recjson = obj[0]["metadata"]
......
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