Commit 5df9dce6 authored by legac's avatar legac
Browse files

Remove all default related to LHCb in selector.

Polish the slector default values and fix a bug in list_tool.
parent 6fa0b6e3
......@@ -17,8 +17,8 @@ virtdb = DAL(None)
virtdb.define_table('harvester_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, default=2, label='Team'),
Field('store', 'string', default='articles'))
Field('id_teams', db.teams, label='Team'),
Field('store', 'string'))
virtdb.harvester_selector.id_teams.requires = IS_IN_DB(db,
'teams.id',
......@@ -37,8 +37,8 @@ virtdb.harvester_selector.store.requires = IS_IN_SET(['articles',
virtdb.define_table('list_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, default=2, label='Team'),
Field('id_projects', db.projects, default=1, label='Project'),
Field('id_teams', db.teams, default=undef_id, label='Team'),
Field('id_projects', db.projects, default=undef_id, label='Project'),
Field('author', 'string'),
Field('list', 'string', default='basic'),
Field('format', 'string', default='html'))
......@@ -61,8 +61,8 @@ virtdb.list_selector.format.requires = IS_IN_SET(['html', 'tex', 'pdf'])
tp_xml = T("XML string describing one MARC12 record.")
virtdb.define_table('marc12_selector',
Field('id_teams', db.teams, default=2, label='Team'),
Field('type', 'string', default='articles'),
Field('id_teams', db.teams, label='Team'),
Field('type', 'string'),
Field('xml', 'text', comment=tp_xml))
virtdb.marc12_selector.id_teams.requires = IS_IN_DB(db,
......@@ -77,15 +77,15 @@ virtdb.marc12_selector.type.requires = IS_IN_SET(['articles',
'talks',
'theses'])
virtdb.marc12_selector.xml.requires = IS_MATCH('<\?xml*')
#virtdb.marc12_selector.xml.requires = IS_MATCH('<\?xml*')
#
# metric selector
#
virtdb.define_table('metric_selector',
Field('year_start', 'integer', default=year),
Field('year_end', 'integer'),
Field('id_teams', db.teams, default=2, label='Team'),
Field('id_projects', db.projects, default=1, label='Project'),
Field('id_teams', db.teams, default=undef_id, label='Team'),
Field('id_projects', db.projects, default=undef_id, label='Project'),
Field('metric', 'string', default='basic'))
virtdb.metric_selector.id_projects.requires = IS_IN_DB(db,
......
......@@ -188,7 +188,7 @@ class Diplomas(ListTool):
query = (query) & (db.diplomas.id_teams == self.id_team)
if self.author:
query = (query) & (db.diplomas.authors_cppm.contains(self.author))
query = (query) & (db.diplomas.author.contains(self.author))
if self.y1 and not self.y2:
query = (query) & (db.diplomas.year == self.y1)
......
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