Commit d725ceae authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Polsih cppm_authors and fix a bug in the Notes.

parent 7401b237
......@@ -1343,6 +1343,7 @@ class Notes(PublicationsTool):
......@@ -917,7 +917,7 @@ class Record(dict):
@rtype: list
- Author names are formatted by the function
- Author names formatted by the function
defined in the constructor.
- The list is empty when authors are not defined.
......@@ -927,22 +927,27 @@ class Record(dict):
if "700" in self:
authors = self._get("700", 'a', force_list=True)
# from time to time the first authors is not included in the list ?
# from time to time the first author contains more than one name
# the first author is only defined
# the first authors is not included in the list ?
# the first author can contains more than one name
if "100" in self:
fa = self._get("100", 'a', force_list=True)
for el in fa:
if el not in authors:
authors.insert(0, el)
if not authors and fa:
elif fa:
# preserve the authors order
for i in range(len(fa)-1, -1, -1):
author = fa[i]
if author not in authors:
authors.insert(0, author)
elif "100" in self:
authors = self._get("100", 'a', force_list=True)
# format the author name and sort them
li = []
for name in authors:
# format the author name
for i in range(len(authors)):
authors[i] = self._format(authors[i])
return li
return authors
def collaboration(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment