Commit 3d64bed6 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Improve strategy to define the origin field, in the controller edit_insert.

parent a132584f
......@@ -156,11 +156,20 @@ def edit_insert():
values['PublicationsId_collaborations'] = int(recId)
# teams, project, categories, origin
# teams, project, categories
values['PublicationsId_categories'] = int(selector.id_categories)
values['PublicationsId_projects'] = int(selector.id_projects)
values['PublicationsId_teams'] = int(selector.id_teams)
values['PublicationsOrigin'] = OAI_URL % (selector.host, selector.record_id)
# origin
# Note:
# - It is always defined
# - Use a trivial algorithm to recover it
oai_url = record.oai_url()
if not oai_url:
oai_url = OAI_URL % (selector.host, selector.record_id)
values['PublicationsOrigin'] = oai_url
# publishers
if selector.controller in ('articles', 'proceedings'):
......
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