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

Handle the collaboration field when running a Proceeding, Reports or Talks harvester.

parent c34bb4e0
......@@ -912,7 +912,14 @@ class Proceedings(PublicationsTool):
# check conference country
id_countries = get_create_id(db.countries, country=country)
# check the collaboration
if record.collaboration():
id_collaboration = get_create_id(db.collaborations,
collaboration=record.collaboration())
else:
id_collaboration = UNDEF_ID
# check against an already published proceeding
id = get_id(db.publications, authors=authors,
conference_dates=conference_dates,
......@@ -976,6 +983,7 @@ class Proceedings(PublicationsTool):
conference_url=conference.conference_url(),
first_author=first_author,
id_categories=self.harvester.id_categories,
id_collaborations=id_collaboration,
id_countries=id_countries,
id_projects=self.harvester.id_projects,
id_status=UNDEF_ID,
......@@ -1018,7 +1026,14 @@ class Reports(PublicationsTool):
if not first_author:
first_author = UNKNOWN
id_status = get_id(db.status, code=UNKNOWN)
# check the collaboration
if record.collaboration():
id_collaboration = get_create_id(db.collaborations,
collaboration=record.collaboration())
else:
id_collaboration = UNDEF_ID
# check against already published reports
id = get_id(db.publications, id_categories=self.harvester.id_categories,
id_projects=self.harvester.id_projects,
......@@ -1036,6 +1051,7 @@ class Reports(PublicationsTool):
authors_cppm=authors_cppm,
first_author=first_author,
id_categories=self.harvester.id_categories,
id_collaborations=id_collaboration,
id_projects=self.harvester.id_projects,
id_status=id_status,
id_teams=self.harvester.id_teams,
......@@ -1085,6 +1101,13 @@ class Talks(PublicationsTool):
# check country
id_countries = get_create_id(db.countries, country=country)
# check the collaboration
if record.collaboration():
id_collaboration = get_create_id(db.collaborations,
collaboration=record.collaboration())
else:
id_collaboration = UNDEF_ID
# check against already published talks
# A talk defines title, first author, conference parameter
# a category and a year. Latter on this talk might be transform
......@@ -1122,6 +1145,7 @@ class Talks(PublicationsTool):
conference_url=conference.conference_url(),
first_author=first_author,
id_categories=self.harvester.id_categories,
id_collaborations=id_collaboration,
id_countries=id_countries,
id_projects=self.harvester.id_projects,
id_status=UNDEF_ID,
......
......@@ -6,6 +6,7 @@ HEAD
- Consolidate the authentification procedure.
- Improve the publication column template.
- Add the field category in the list selector.
- Check collaboration in Proceeding, Reports and Talks harvester.
0.8.1 (Dec 2012)
- Migrate to plugin_dbui 0.4.10.1.
......
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