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

Add a protection in RecordPubli.authors and CheckandFix.format_authors (trigger by ins718872).

parent 4041a90e
......@@ -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
......
......@@ -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
......
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