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

Update automatons to fix a bug calling Msg.reject

parent 70adb82b
......@@ -58,7 +58,7 @@ class Articles(Automaton):
stype = record.subtype()
if stype != "article":
self.logs[-1].reject(MSG_IS.format(stype), record)
self.logs[-1].reject(MSG_IS.format(stype), record=record)
return False
try:
......
......@@ -184,12 +184,12 @@ class Automaton(object):
if isinstance(msg, list):
msg = "%s %s" % (msg[0], msg[-1])
self.logs[-1].reject(msg, log_year)
self.logs[-1].reject(msg, year=log_year)
return 0
# operation can be rejected by the database
except Exception as dbe:
self.logs[-1].reject(str(dbe), log_year)
self.logs[-1].reject(str(dbe), year=log_year)
return 0
def _is_record_in_db(self,
......
......@@ -37,7 +37,7 @@ class Notes(Automaton):
stype = record.subtype()
if stype != "note":
self.logs[-1].reject(MSG_IS.format(stype), record)
self.logs[-1].reject(MSG_IS.format(stype), record=record)
return False
try:
......
......@@ -45,7 +45,7 @@ class Preprints(Automaton):
stype = record.subtype()
if stype != "preprint":
self.logs[-1].reject(MSG_IS.format(stype), record)
self.logs[-1].reject(MSG_IS.format(stype), record=record)
return False
if record.is_published():
......
......@@ -43,7 +43,7 @@ class Proceedings(Automaton):
stype = record.subtype()
if stype != "proceeding":
self.logs[-1].reject(MSG_IS.format(stype), record)
self.logs[-1].reject(MSG_IS.format(stype), record=record)
return False
try:
......
......@@ -40,7 +40,7 @@ class Talks(Automaton):
self.logger.debug(f"{T4}check and fix record (talk)")
if not isinstance(record, (RecordCdsConfPaper, RecordHepConfPaper)):
self.logs[-1].reject(MSG_NOT_TALK, record)
self.logs[-1].reject(MSG_NOT_TALK, record=record)
return False
try:
......
......@@ -33,7 +33,7 @@ class Thesis(Automaton):
stype = record.subtype()
if stype != "thesis":
self.logs[-1].reject(MSG_IS.format(stype), record)
self.logs[-1].reject(MSG_IS.format(stype), record=record)
return False
try:
......
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