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
e0696b32
Commit
e0696b32
authored
Jan 27, 2020
by
LE GAC Renaud
Browse files
Update recordpubli to improve find_affiliation algorithm.
parent
dcef58ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
modules/invenio_tools/recordpubli.py
modules/invenio_tools/recordpubli.py
+5
-5
No files found.
modules/invenio_tools/recordpubli.py
View file @
e0696b32
...
...
@@ -396,13 +396,13 @@ class RecordPubli(Record):
"""
df
=
self
[
"authors"
]
# modify the pattern to capture group
p
at
tern
=
"(%s)"
%
pattern
query
=
df
.
affiliation
.
str
.
match
(
pattern
)
d
at
a
=
df
[
query
]
data
=
(
df
.
affiliation
.
str
.
extract
(
pattern
,
expand
=
False
)
.
dropna
()
.
unique
())
if
data
.
empty
:
return
""
data
=
data
.
affiliation
.
unique
()
return
(
data
[
0
]
if
len
(
data
)
>
0
else
""
)
def
find_authors
(
self
,
pattern
,
sep
=
", "
,
sort
=
False
):
...
...
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