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
0c70e367
Commit
0c70e367
authored
Jan 13, 2021
by
LE GAC Renaud
Browse files
Update BAseStore and MsgCollection to fix issue in last search URL
parent
60be8e09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
modules/harvest_tools/msgcollection.py
modules/harvest_tools/msgcollection.py
+13
-4
modules/store_tools/basestore.py
modules/store_tools/basestore.py
+2
-2
No files found.
modules/harvest_tools/msgcollection.py
View file @
0c70e367
...
...
@@ -21,6 +21,7 @@ class MsgCollection(Storage):
title of the collection.
"""
def
__init__
(
self
,
error
=
""
,
found
=
0
,
title
=
""
,
url
=
""
):
Storage
.
__init__
(
self
)
self
.
error
=
error
...
...
@@ -29,11 +30,19 @@ class MsgCollection(Storage):
self
.
url
=
url
def
url_hb
(
self
):
"""
"""URL configured to return a list of record in readable format.
Returns:
str:
an URL configures to return a list of record
sin readable format.
"""
return
self
.
url
.
replace
(
"of=id"
,
"of=hb"
)
url
=
self
.
url
# remove list of id constraints
# cds.cern.ch store
if
"of=id"
in
url
:
return
url
.
replace
(
"of=id"
,
"of=hb"
)
# new inspirehep store
if
"&fields=recid"
in
url
:
return
url
.
replace
(
"&fields=recid"
,
""
).
replace
(
"/api/"
,
"/"
)
modules/store_tools/basestore.py
View file @
0c70e367
...
...
@@ -148,11 +148,11 @@ class BaseStore(object):
something went wrong within the HTTP dialog
"""
self
.
_url
=
url
r
=
self
.
_session
.
get
(
url
,
timeout
=
timeout
,
params
=
kwargs
)
r
.
raise_for_status
()
self
.
_url
=
r
.
url
return
r
def
last_search_url
(
self
):
...
...
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