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

Improve the logic of the EditAndInsert wizard.

parent 38416eb8
......@@ -137,16 +137,6 @@ def edit_insert():
id = get_id(db.collaborations, collaboration=record.collaboration())
values['PublicationsId_collaborations'] = (int(id) if id else UNDEF_ID)
# submitted date and year
try:
check.submitted(record)
check.year(record)
except CheckException:
pass
values['PublicationsSubmitted'] = ', '.join(record.submitted())
values['PublicationsYear'] = record.year()
# teams, project, categories, origin
values['PublicationsId_categories'] = int(selector.id_categories)
values['PublicationsId_projects'] = int(selector.id_projects)
......@@ -165,6 +155,11 @@ def edit_insert():
# conference
if selector.controller in ('proceedings', 'talks'):
try:
check.conference(record)
except CheckException:
pass
values['PublicationsConference_title'] = record.conference_title()
values['PublicationsConference_url'] = record.conference_url()
values['PublicationsConference_dates'] = record.conference_dates()
......@@ -181,6 +176,16 @@ def edit_insert():
values['PublicationsUniversities'] = record.these_universities()
values['PublicationsDirectors'] = record.directors()
values['PublicationsDefense'] = record.defense()
# submitted date and year
try:
check.submitted(record)
check.year(record)
except CheckException:
pass
values['PublicationsSubmitted'] = ', '.join(record.submitted())
values['PublicationsYear'] = record.year()
except (CdsException, Marc12Exception, ToolException), e:
return INLINE_ALERT % (T('Error'), T(str(e)))
......
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