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

Propagate the CheckAndFix.search methods in automatons.

parent 858374ab
......@@ -257,9 +257,9 @@ class Articles(Automaton):
volume = record.paper_volume()
year = record.paper_year()
# get the publisher / collaboration identifier
id_publisher = self.get_create_publisher(editor)
id_collaboration = self.get_create_collaboration(record.collaboration())
# get the collaboration / publisher identifiers
id_collaboration = self.search_collaboration(record.collaboration())
id_publisher = self.search_publisher(editor)
# get already published articles or preprint
# A preprint is transform into an article.
......
......@@ -92,7 +92,7 @@ class Preprints(Automaton):
year = record.year()
# get the collaboration identifier
id_collaboration = self.get_create_collaboration(record.collaboration())
id_collaboration = self.search_collaboration(record.collaboration())
# get existing preprint or article
fields = dict(first_author=first_author,
......
......@@ -8,7 +8,7 @@ import traceback
from automaton import Automaton
from base import family_name_fr, format_author_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException
from plugin_dbui import get_id, UNDEF_ID
from plugin_dbui import UNDEF_ID
class Proceedings(Automaton):
......@@ -70,8 +70,6 @@ class Proceedings(Automaton):
zero otherwise.
"""
db = self.db
# alias
oai_url = record.oai_url()
year = record.paper_year()
......@@ -95,11 +93,11 @@ class Proceedings(Automaton):
conference_dates = record.conference_dates()
conference_title = record.conference_title()
first_author = record.first_author()
id_country = get_id(db.countries, country=record.conference_country())
id_country = self.search_country(record.conference_country())
# get the collaboration/publisher identifier
id_collaboration = self.get_create_collaboration(record.collaboration())
id_publisher = self.get_create_publisher(editor)
# get the collaboration/publisher identifiers
id_collaboration = self.search_collaboration(record.collaboration())
id_publisher = self.search_publisher(editor)
# get an already published proceeding
fields = dict(authors=authors,
......
......@@ -90,7 +90,7 @@ class Reports(Automaton):
id_status = get_id(db.status, code=UNKNOWN)
# get the collaboration identifier
id_collaboration = self.get_create_collaboration(record.collaboration())
id_collaboration = self.search_collaboration(record.collaboration())
# get an already published reports
fields = dict(id_categories=self.id_category,
......
......@@ -8,7 +8,7 @@ import traceback
from automaton import Automaton
from base import family_name_fr, format_author_fr, MSG_CRASH, MSG_LOAD
from invenio_tools import CheckException
from plugin_dbui import get_id, UNDEF_ID
from plugin_dbui import UNDEF_ID
class Talks(Automaton):
......@@ -65,8 +65,6 @@ class Talks(Automaton):
zero otherwise.
"""
db = self.db
# alias
oai_url = record.oai_url()
year = record.year()
......@@ -75,12 +73,12 @@ class Talks(Automaton):
conference_dates = record.conference_dates()
conference_title = record.conference_title()
first_author = record.first_author()
id_country = get_id(db.countries, country=record.conference_country())
id_country = self.search_country(record.conference_country())
submitted = record.submitted()[0]
title = record.title()
# get the collaboration identifier
id_collaboration = self.get_create_collaboration(record.collaboration())
id_collaboration = self.search_collaboration(record.collaboration())
# get an already published talk
fields = dict(conference_title=conference_title,
......
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