Commit 57e866b5 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update articles, notes, reports and thesis to fix a bug extracting submitted date

parent 36875551
...@@ -10,7 +10,6 @@ from .base import (learn_my_authors, ...@@ -10,7 +10,6 @@ from .base import (learn_my_authors,
from .checkandfix import CheckException from .checkandfix import CheckException
from plugin_dbui import get_id, UNDEF_ID from plugin_dbui import get_id, UNDEF_ID
MSG_NO_EDITOR = "Reject article is not published" MSG_NO_EDITOR = "Reject article is not published"
MSG_TRANSFORM_PREPRINT = "Transform the preprint into an article" MSG_TRANSFORM_PREPRINT = "Transform the preprint into an article"
...@@ -22,6 +21,7 @@ class Articles(Automaton): ...@@ -22,6 +21,7 @@ class Articles(Automaton):
"""Automaton for articles. """Automaton for articles.
""" """
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
Automaton.__init__(self, *args, **kwargs) Automaton.__init__(self, *args, **kwargs)
...@@ -308,7 +308,7 @@ class Articles(Automaton): ...@@ -308,7 +308,7 @@ class Articles(Automaton):
pages = record.paper_pages() pages = record.paper_pages()
preprint_number = record.preprint_number() preprint_number = record.preprint_number()
publication_url = record.paper_url() publication_url = record.paper_url()
submitted = record.submitted()[0] submitted = record.submitted()
title = record.title() title = record.title()
volume = record.paper_volume() volume = record.paper_volume()
year = record.paper_year() year = record.paper_year()
......
...@@ -13,6 +13,7 @@ class Notes(Automaton): ...@@ -13,6 +13,7 @@ class Notes(Automaton):
"""Automaton for notes. """Automaton for notes.
""" """
def check_record(self, record): def check_record(self, record):
"""Check the content of the note in order to fix non conformities. """Check the content of the note in order to fix non conformities.
...@@ -90,7 +91,7 @@ class Notes(Automaton): ...@@ -90,7 +91,7 @@ class Notes(Automaton):
origin=oai_url, origin=oai_url,
publication_url=record.paper_url(), publication_url=record.paper_url(),
report_numbers=record.report_number(), report_numbers=record.report_number(),
submitted=record.submitted()[0], submitted=record.submitted(),
title=title, title=title,
year=year) year=year)
......
...@@ -6,7 +6,6 @@ from .base import MSG_CRASH, MSG_LOAD ...@@ -6,7 +6,6 @@ from .base import MSG_CRASH, MSG_LOAD
from .checkandfix import CheckException from .checkandfix import CheckException
from plugin_dbui import get_id, UNDEF_ID, UNKNOWN from plugin_dbui import get_id, UNDEF_ID, UNKNOWN
MSG_REPORT_NO_NUMBER = "Reject no report number" MSG_REPORT_NO_NUMBER = "Reject no report number"
T4 = " "*4 T4 = " "*4
...@@ -15,6 +14,7 @@ class Reports(Automaton): ...@@ -15,6 +14,7 @@ class Reports(Automaton):
"""Automaton for reports to committee. """Automaton for reports to committee.
""" """
def check_record(self, record): def check_record(self, record):
"""Check the content of the report in order to fix non conformities. """Check the content of the report in order to fix non conformities.
...@@ -114,7 +114,7 @@ class Reports(Automaton): ...@@ -114,7 +114,7 @@ class Reports(Automaton):
preprint=record.preprint_number(), preprint=record.preprint_number(),
publication_url=record.paper_url(), publication_url=record.paper_url(),
report_numbers=record.report_number(), report_numbers=record.report_number(),
submitted=record.submitted()[0], submitted=record.submitted(),
title=title, title=title,
year=year) year=year)
......
...@@ -3,13 +3,11 @@ ...@@ -3,13 +3,11 @@
""" """
import re import re
from .automaton import Automaton from .automaton import Automaton
from .base import MSG_CRASH, MSG_LOAD from .base import MSG_CRASH, MSG_LOAD
from .checkandfix import CheckException from .checkandfix import CheckException
from plugin_dbui import get_id, UNDEF_ID from plugin_dbui import get_id, UNDEF_ID
T4 = " "*4 T4 = " "*4
...@@ -17,6 +15,7 @@ class Thesis(Automaton): ...@@ -17,6 +15,7 @@ class Thesis(Automaton):
"""Automaton for thesis. """Automaton for thesis.
""" """
def check_record(self, record): def check_record(self, record):
"""Check the content of the thesis in order to fix non conformities. """Check the content of the thesis in order to fix non conformities.
...@@ -106,7 +105,7 @@ class Thesis(Automaton): ...@@ -106,7 +105,7 @@ class Thesis(Automaton):
id_status=UNDEF_ID, id_status=UNDEF_ID,
origin=oai_url, origin=oai_url,
publication_url=record.paper_url(), publication_url=record.paper_url(),
submitted=record.submitted()[0], submitted=record.submitted(),
title=title, title=title,
universities=universities, universities=universities,
year=year) year=year)
......
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