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
ddee02ba
Commit
ddee02ba
authored
Jan 28, 2020
by
LE GAC Renaud
Browse files
Update RecordPubli to add protection.
parent
0a0b3f9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
modules/invenio_tools/recordpubli.py
modules/invenio_tools/recordpubli.py
+14
-5
No files found.
modules/invenio_tools/recordpubli.py
View file @
ddee02ba
...
...
@@ -616,7 +616,7 @@ class RecordPubli(Record):
"""
df
=
self
[
"publication_info"
]
return
df
.
title
.
iloc
[
0
]
return
(
df
.
title
.
iloc
[
0
]
if
"title"
in
df
else
""
)
def
paper_pages
(
self
):
"""The page number / range when the record is published in a review.
...
...
@@ -628,7 +628,7 @@ class RecordPubli(Record):
"""
df
=
self
[
"publication_info"
]
return
df
.
pagination
.
iloc
[
0
]
return
(
df
.
pagination
.
iloc
[
0
]
if
"pagination"
in
df
else
""
)
def
paper_reference
(
self
):
"""The full reference for a publication published in a review.
...
...
@@ -640,8 +640,17 @@ class RecordPubli(Record):
published in a review.
"""
paper
=
self
[
"publication_info"
].
iloc
[
0
]
df
=
self
[
"publication_info"
]
its
=
df
.
columns
.
intersection
({
"title"
,
"volume"
,
"year"
,
"pagination"
})
if
len
(
its
)
!=
4
:
return
""
paper
=
df
.
iloc
[
0
]
li
=
[
paper
.
title
,
paper
.
volume
,
paper
.
year
,
...
...
@@ -682,7 +691,7 @@ class RecordPubli(Record):
"""
df
=
self
[
"publication_info"
]
return
df
.
volume
.
iloc
[
0
]
return
(
df
.
volume
.
iloc
[
0
]
if
"volume"
in
df
else
""
)
def
paper_year
(
self
):
"""The year of the publication.
...
...
@@ -693,7 +702,7 @@ class RecordPubli(Record):
"""
df
=
self
[
"publication_info"
]
return
df
.
year
.
iloc
[
0
]
return
(
df
.
year
.
iloc
[
0
]
if
"year"
in
df
else
""
)
def
preprint_number
(
self
):
"""The ArXiv preprint number.
...
...
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