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):
origin=oai_url,
publication_url=record.paper_url(),
report_numbers=record.report_number(),
submitted=record.submitted(),
title=title,
year=year)
......
......@@ -917,7 +917,7 @@ class Record(dict):
@rtype: list
@return:
- 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:
authors.extend(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:
li.append(self._format(name))
# 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