MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit 3a34dee6 authored by HERBERT Ryan's avatar HERBERT Ryan
Browse files

cleaning up a code duplication for maintainability

parent b342a4bd
......@@ -143,7 +143,7 @@ def custom():
if type(request.vars["custom_list"]) is str :
request.vars["custom_list"] = [request.vars["custom_list"]]
myGroupBy = None
if request.vars["patient_id"]:
q = ((auth.accessible_query('read', db.patient))
& (auth.accessible_query('read', db.config))
......@@ -153,13 +153,7 @@ def custom():
& (db.results_file.data_file != '')
& (db.config.id==db.results_file.config_id)
)
query = db(q).select(
db.patient.id, db.patient.info, db.patient.first_name, db.patient.last_name, db.results_file.id, db.results_file.config_id, db.sequence_file.sampling_date,
db.sequence_file.pcr, db.config.name, db.results_file.run_date, db.results_file.data_file, db.sequence_file.filename,
db.sequence_file.patient_id, db.sequence_file.data_file, db.sequence_file.id, db.sequence_file.info,
db.sequence_file.size_file,
orderby = ~db.sequence_file.patient_id|db.sequence_file.id|db.results_file.run_date
)
else:
q = ((auth.accessible_query('read', db.patient))
& (auth.accessible_query('read', db.config))
......@@ -168,14 +162,15 @@ def custom():
& (db.results_file.data_file != '')
& (db.config.id==db.results_file.config_id)
)
myGroupBy = db.sequence_file.id|db.results_file.config_id
query = db(q).select(
query = db(q).select(
db.patient.id, db.patient.info, db.patient.first_name, db.patient.last_name, db.results_file.id, db.results_file.config_id, db.sequence_file.sampling_date,
db.sequence_file.pcr, db.config.name, db.results_file.run_date, db.results_file.data_file, db.sequence_file.filename,
db.sequence_file.patient_id, db.sequence_file.data_file, db.sequence_file.id, db.sequence_file.info,
db.sequence_file.size_file,
orderby = ~db.sequence_file.patient_id|db.sequence_file.id|db.results_file.run_date,
groupby = db.sequence_file.id|db.results_file.config_id,
groupby = myGroupBy
)
##filter
......
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