Commit 248ee4a5 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

sample_set.py add tag filtering for custom route

The decorated sample tags were implemented to redirect to
'/sample_set/custom' while passing the tag as a parameter, so now this
parameter will be taken into account and only display samples that have
said tag
parent ccc5b260
......@@ -371,6 +371,13 @@ def custom():
)
myGroupBy = db.sequence_file.id|db.patient.id|db.run.id|db.generic.id|db.results_file.config_id
if "tag" in request.vars:
q = (q
& (db.tag.name == request.vars["tag"])
& (db.tag_ref.tag_id == db.tag.id)
& (db.tag_ref.table_name == 'sequence_file')
& (db.tag_ref.record_id == db.sequence_file.id))
query = db(q).select(
db.patient.id, db.patient.info, db.patient.first_name, db.patient.last_name,
db.run.id, db.run.info, db.run.name,
......
Supports Markdown
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