Commit 2fa9fde1 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update wizards/affiliation_publication to add a protection.

parent 35ac361c
......@@ -27,6 +27,7 @@ MSG_NO_AUTHOR = "Author not found!"
MSG_NO_INSTITUTE = "Institute not found in the inspirehep database!"
MSG_NO_PUBLICATION = "Publication not found!"
MSG_NO_SERVER = "Server is not reachable or respond badly!"
MSG_TO_MANY_AFFILIATION = "More than one affiliation for the selected author!"
def affiliation_institute():
......@@ -98,10 +99,15 @@ def affiliation_publication():
reg = re.compile(pattern, re.IGNORECASE)
key = None
if "700" in record and isinstance(record[u"700"], list):
if u"700" in record and isinstance(record[u"700"], list):
for di in record[u"700"]:
author = di["a"]
if reg.match(author):
if isinstance(di["u"], list):
if "v" in di:
key = dict(key_u=di["u"], key_v=di["v"])
......@@ -383,6 +383,7 @@
'Modified On': 'Modified On',
'Modify': 'Modifier',
'month': 'mois',
'More than one affiliation for the selected author!': "Plus d'une affiliation pour l'auteur sélectionné !",
'my_authors': 'autheurs du laboratoire',
'Name': 'Nom',
'Name of a function located in the modules list_postprocessing. Can be a list of name separated by comma.': 'Liste de fonction du module list_postprocessing, séparé par une virgule. Les fonctions disponibles sont : clean, highlight_my_authors, highlight_my_speaker, remove_undef.',
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