Commit f8986338 authored by Vidjil's avatar Vidjil Committed by Mikaël Salson

controllers/clonedb.py: Start by loading permissions to avoid many queries for permissions

parent 8af4bfe1
......@@ -36,6 +36,8 @@ def search_clonedb(sequences, sample_set_id):
results = []
parent_group = get_default_creation_group(auth)[1]
auth.load_permissions(PermissionEnum.read.value, 'sample_set')
auth.load_permissions(PermissionEnum.anon.value, 'sample_set')
for sequence in sequences:
options = clonedb.build_grep_clones_options({'sequence': sequence+' -sample_set:%d' % sample_set_id,
'index': 'clonedb_{}'.format(parent_group)})
......
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