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
f760adb1
Commit
f760adb1
authored
Sep 20, 2015
by
LE GAC Renaud
Browse files
Add a protection in RecordPubli.authors and CheckandFix.format_authors (trigger by ins718872).
parent
4041a90e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
modules/invenio_tools/checkandfix.py
modules/invenio_tools/checkandfix.py
+5
-3
modules/invenio_tools/recordpubli.py
modules/invenio_tools/recordpubli.py
+3
-1
No files found.
modules/invenio_tools/checkandfix.py
View file @
f760adb1
...
...
@@ -332,14 +332,16 @@ class CheckAndFix(object):
@param func: function used to format the author names
"""
for
key
in
(
"100"
,
"700"
):
for
key
in
(
u
"100"
,
u
"700"
):
if
key
in
record
:
if
isinstance
(
record
[
key
],
list
):
for
i
in
range
(
len
(
record
[
key
])):
record
[
key
][
i
][
"a"
]
=
func
(
record
[
key
][
i
][
"a"
])
if
"a"
in
record
[
key
][
i
]:
record
[
key
][
i
][
"a"
]
=
func
(
record
[
key
][
i
][
"a"
])
else
:
record
[
key
][
"a"
]
=
func
(
record
[
key
][
"a"
])
if
"a"
in
record
[
key
]:
record
[
key
][
"a"
]
=
func
(
record
[
key
][
"a"
])
def
format_editor
(
self
,
record
):
"""Format the editor abbreviation since the encoding
...
...
modules/invenio_tools/recordpubli.py
View file @
f760adb1
...
...
@@ -76,7 +76,9 @@ class RecordPubli(Record):
for
di
in
self
[
u
"700"
]:
if
"e"
in
di
and
di
[
"e"
]
==
THESIS_DIR
:
continue
authors
.
append
(
di
[
"a"
])
if
"a"
in
di
:
authors
.
append
(
di
[
"a"
])
return
authors
...
...
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