Commit 7f6095e6 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update the graph selector to add the author criteria.

parent 0cc84aa4
......@@ -77,7 +77,7 @@ def index():
either as a linechart or as a stacked histograms.
fields = ('cumulative','id_graphs', 'time', 'year_start','year_end')
fields = ('author', 'cumulative','id_graphs', 'time', 'year_start','year_end')
selector = Selector(virtdb.graph_selector, exclude_fields=fields)
# graph configuration
......@@ -13,6 +13,7 @@ virtdb.define_table('graph_selector',
Field('id_teams', 'reference teams', label='Team'),
Field('id_projects', 'reference projects', label='Project'),
Field('id_categories', 'reference categories', label='Category'),
Field('author', 'string'),
Field('id_authors_roles', 'reference authors_roles', label='Role'),
Field('id_graphs', 'reference graphs', label='Graph'),
Field('cumulative', 'boolean', default=True),
......@@ -230,6 +230,10 @@ def do_query(publications, selector):
elif year_end and not year_start:
query &= publications.submitted[0:4] <= year_end
q_author = publications.authors_institute.contains(
query &= q_author
return query
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