Commit b1d8a08a authored by Ryan Herbert's avatar Ryan Herbert Committed by Mikaël Salson

force inner joins on sample_set query

parent 5d681766
...@@ -44,9 +44,11 @@ class SampleSetList(): ...@@ -44,9 +44,11 @@ class SampleSetList():
groupby = [s_table.id, s_table.sample_set_id, s_table.info, db.auth_user.last_name] groupby = [s_table.id, s_table.sample_set_id, s_table.info, db.auth_user.last_name]
groupby += helper.get_dedicated_group() groupby += helper.get_dedicated_group()
query = ((auth.vidjil_accessible_query('read', db.sample_set)) & join = [s_table.on(s_table.sample_set_id == db.sample_set.id),
(s_table.sample_set_id == db.sample_set.id) & db.auth_user.on(db.auth_user.id == s_table.creator)
(s_table.creator == db.auth_user.id)) ]
query = (auth.vidjil_accessible_query('read', db.sample_set))
if search is not None and search != "": if search is not None and search != "":
query = (query & query = (query &
...@@ -79,6 +81,7 @@ class SampleSetList(): ...@@ -79,6 +81,7 @@ class SampleSetList():
db.tag_ref.table_name, db.tag_ref.table_name,
count, count,
*select + dedicated_fields, *select + dedicated_fields,
join=join,
left=left, left=left,
limitby = limitby, limitby = limitby,
orderby = ~db[self.type].id, orderby = ~db[self.type].id,
...@@ -91,6 +94,7 @@ class SampleSetList(): ...@@ -91,6 +94,7 @@ class SampleSetList():
query query
).select( ).select(
*select + dedicated_fields, *select + dedicated_fields,
join=join,
left=left, left=left,
limitby = limitby, limitby = limitby,
groupby = groupby, groupby = groupby,
......
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