Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
5742c84e
Commit
5742c84e
authored
Jan 07, 2021
by
LE GAC Renaud
Browse files
Update store_tools/factory.py to the new inspireh API
parent
a54c3941
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
modules/store_tools/factory.py
modules/store_tools/factory.py
+2
-5
No files found.
modules/store_tools/factory.py
View file @
5742c84e
...
@@ -323,10 +323,7 @@ def get_conference_data(host, conf_id=None, key=None):
...
@@ -323,10 +323,7 @@ def get_conference_data(host, conf_id=None, key=None):
# search by id in inspirehep.net
# search by id in inspirehep.net
#
#
if
conf_id
is
not
None
and
host
in
INS
:
if
conf_id
is
not
None
and
host
in
INS
:
obj
=
store
.
get_record
(
conf_id
)
return
store
.
get_record
(
conf_id
)
if
obj
[
"id"
]
!=
str
(
conf_id
):
raise
CdsException
(
MSG_INV_CONF
)
return
obj
[
"metadata"
]
# ........................................................................
# ........................................................................
#
#
...
@@ -338,7 +335,7 @@ def get_conference_data(host, conf_id=None, key=None):
...
@@ -338,7 +335,7 @@ def get_conference_data(host, conf_id=None, key=None):
if
not
REG_CONF
.
match
(
key
):
if
not
REG_CONF
.
match
(
key
):
raise
CdsException
(
MSG_INV_CONF_KEY
)
raise
CdsException
(
MSG_INV_CONF_KEY
)
obj
=
store
.
search
(
f
"cnum:
{
key
}
"
)
obj
=
store
.
search
(
q
=
f
"cnum:
{
key
}
"
)
try
:
try
:
recjson
=
obj
[
0
][
"metadata"
]
recjson
=
obj
[
0
][
"metadata"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment