Commit f76ac497 authored by Mikael Salson's avatar Mikael Salson Committed by Vidjil

sample_set.py: Redirect on same sample set type

This is a minor correction but we should not force redirecting on a given sample set
if another had been provided.
parent 28d8778b
Pipeline #22284 failed with stages
in 30 seconds
......@@ -146,17 +146,18 @@ def index():
## return a list of generic sample_sets
def all():
start = time.time()
if request.vars['type']:
type = request.vars['type']
else :
type = defs.SET_TYPE_GENERIC
if not auth.user :
res = {"redirect" : URL('default', 'user', args='login', scheme=True, host=True,
vars=dict(_next=URL('sample_set', 'all', vars={'type': defs.SET_TYPE_PATIENT, 'page': 0}, scheme=True, host=True)))
vars=dict(_next=URL('sample_set', 'all', vars={'type': type, 'page': 0}, scheme=True, host=True)))
}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
isAdmin = auth.is_admin()
if request.vars['type']:
type = request.vars['type']
else :
type = defs.SET_TYPE_GENERIC
step = None
page = None
......
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