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

Bugs fixed.

parent fca13ec7
......@@ -133,21 +133,26 @@ class Automaton(object):
try:
rec_id = db.publications.insert (**fields)
return 1
if rec_id:
return 1
# operation can be rejected by the database
except Exception as dbe:
self.logs[-1].reject(dbe.message, year)
# operation can be reject by callbacks table._before_insert
else:
msg = MSG_NSERT_FAIL
if CALLBACK_ERRORS in db.publications:
msg = db.publications._callback_errors
# operation can be reject by callbacks table._before_insert
if not rec_id:
msg = MSG_NSERT_FAIL
if CALLBACK_ERRORS in db.publications:
msg = db.publications._callback_errors
# reduce the error message
if isinstance(msg, list):
msg = "%s %s" % (msg[0], msg[-1])
self.logs[-1].reject(msg, year)
self.logs[-1].reject(msg, log_year)
return 0
return 0
# operation can be rejected by the database
except Exception as dbe:
self.logs[-1].reject(dbe.message, log_year)
return 0
def _is_record_in_db(self, rec_id, title):
"""Return C{True} if the record is already in the database.
......
......@@ -625,7 +625,7 @@ class CheckAndFix(object):
if not value:
raise CheckException(MSG_NO_MY_AUTHOR)
record.my_author = value
record.my_authors = value
def is_conference(self, record):
"""Check that the record described a conference talk / proceeding.
......
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