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

Countries are now check against an official list and not added by default.

parent aa64b91c
......@@ -448,6 +448,7 @@
'Reject article is not published': "Rejeté l'article n'est pas publié",
'Reject editor is not well formed': "Rejeté l'éditeur est mal formatté",
'Reject incomplete paper reference': 'Rejeté la référence du papier est incomplète',
'Reject invalid country': 'Rejeté pays inconnu',
'Reject no %s authors': "Rejeté pas d'autheur(s) du %s",
'Reject no author(s)': "Rejeté pas d'autheur(s)",
'Reject no authors': "Rejeté pas d'auteurs",
......
......@@ -1636,9 +1636,6 @@ class Proceedings(PublicationsTool):
country = record.conference_country()
first_author = record.first_author()
# check conference country
id_countries = get_create_id(db.countries, country=country)
# check the collaboration
id_collaboration = self.check_collaboration(record.collaboration())
......@@ -2016,9 +2013,6 @@ class Talks(PublicationsTool):
submitted = record.submitted()[0]
title = record.title()
# check country
id_countries = get_create_id(db.countries, country=country)
# check the collaboration
id_collaboration = self.check_collaboration(record.collaboration())
......
......@@ -62,6 +62,7 @@ MONTHS = {u'Jan':'01',
MSG_HTTP_ERROR = current.T("HTTP Error", lazy=False)
MSG_NO_AUTHOR = current.T("Reject no author(s)", lazy=False)
MSG_NO_CONF = current.T("Reject no conference information", lazy=False)
MSG_NO_COUNTRY = current.T("Reject invalid country", lazy=False)
MSG_NO_DATE = current.T("Reject no submission date", lazy=False)
MSG_NO_IDS = current.T("Invalid list of record identifiers", lazy=False)
MSG_NO_MY_AUTHOR = current.T("Reject no %s authors", lazy=False)
......@@ -372,7 +373,7 @@ class CheckAndFix(object):
# for talk or proceeding a key is always defined
if not key:
CheckException(MSG_NO_CONF)
raise CheckException(MSG_NO_CONF)
# get conference information
id = record.reference_conference_id()
......@@ -387,7 +388,13 @@ class CheckAndFix(object):
record[u"111"] = conference["111"]
if "8564" in conference:
record[u"8564"] = conference["8564"]
# check country information (all valid countries have been enter once)
db = current.globalenv['db']
id = get_id(db.countries, country=record.conference_country())
if not id:
raise CheckException(MSG_NO_COUNTRY)
def format_authors(self, record, func):
"""Format the author names using the function func.
......
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