Commit dce19c3d authored by HERBERT Ryan's avatar HERBERT Ryan

resutls_file.py run file info access

Fixed an issue where the query for viewing a results_file's info
expected to have an entry in the patient table attached to the
results_file. This has been corrected to expect only a sample_set
parent c432b581
......@@ -76,12 +76,11 @@ def run_all_patients():
## display run page result
## need ["results_file_id"]
def info():
patient_id = db((db.sequence_file.id == db.results_file.sequence_file_id)
sample_set_id = db((db.sequence_file.id == db.results_file.sequence_file_id)
&(db.results_file.id == request.vars["results_file_id"])
&(db.sample_set_membership.sequence_file_id == db.sequence_file.id)
&(db.patient.sample_set_id == db.sample_set_membership.sample_set_id)
).select(db.patient.id).first().id
if (auth.can_modify_patient(patient_id)):
).select(db.sample_set_membership.sample_set_id).first().sample_set_id
if (auth.can_modify_sample_set(sample_set_id)):
return dict(message=T('result info'))
else :
res = {"message": "acces denied"}
......
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