Commit 6dbde3d3 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Clean import.

parent f760adb1
...@@ -11,12 +11,9 @@ from harvest_tools import (format_author_fr, ...@@ -11,12 +11,9 @@ from harvest_tools import (format_author_fr,
build_harvester_tool, build_harvester_tool,
PublicationsTool, PublicationsTool,
ToolException) ToolException)
from invenio_tools import (CdsException, from invenio_tools import (CheckAndFix,
CheckAndFix,
CheckException, CheckException,
Marc12Exception, load_record,
InvenioStore,
Marc12,
OAI_URL) OAI_URL)
from plugin_dbui import (get_id, from plugin_dbui import (get_id,
INLINE_ALERT, INLINE_ALERT,
...@@ -116,10 +113,7 @@ def edit_insert(): ...@@ -116,10 +113,7 @@ def edit_insert():
return INLINE_ALERT % (T('Error'), msg) return INLINE_ALERT % (T('Error'), msg)
# record # record
store = InvenioStore(selector.host) record = load_record(selector.host, selector.record_id)
xml = store.get_record(selector.record_id)
decode = Marc12()
record = decode(xml)[0]
# form configuration # form configuration
cfg = to_formPanel(db.publications) cfg = to_formPanel(db.publications)
...@@ -136,7 +130,7 @@ def edit_insert(): ...@@ -136,7 +130,7 @@ def edit_insert():
selector.controller, selector.controller,
selector.id_categories, selector.id_categories,
dry_run=True, dry_run=True,
debug=False) debug=True)
# title, preprint, URL, report number # title, preprint, URL, report number
values['PublicationsTitle'] = record.title() values['PublicationsTitle'] = record.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