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
472e1cf3
Commit
472e1cf3
authored
Jan 27, 2020
by
LE GAC Renaud
Browse files
Update recordpubli to improve method find_affiliation.
parent
321d9aa3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
modules/invenio_tools/recordpubli.py
modules/invenio_tools/recordpubli.py
+3
-2
No files found.
modules/invenio_tools/recordpubli.py
View file @
472e1cf3
...
...
@@ -385,7 +385,7 @@ class RecordPubli(Record):
pattern (str):
regular expression defining the affiliation keys.
It has to be build for an exact match namely containing
start and end of string. This is re
u
qired to separate
start and end of string. This is req
u
ired to separate
`Ecole Plolytechnique` from `Ecole Polytechnique, Lausanne`.
Returns:
...
...
@@ -400,7 +400,8 @@ class RecordPubli(Record):
pattern
=
"(%s)"
%
pattern
data
=
(
df
.
affiliation
.
str
.
extract
(
pattern
,
expand
=
False
)
.
dropna
())
.
dropna
()
.
unique
())
return
(
data
[
0
]
if
len
(
data
)
>
0
else
""
)
...
...
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