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

controllers/{default,sample_set}.py: Redirect on patient with page limit on login

Without page limit the patient list takes ages to load.

Fixes #3169
This also confirms that login works in the first place
hence this also closes #2525
parent 7b77dd1a
......@@ -38,7 +38,7 @@ def home():
if auth.is_admin():
redirect = URL('admin', 'index', scheme=True, host=True)
redirect = URL('sample_set', 'all', vars={'type': defs.SET_TYPE_PATIENT}, scheme=True, host=True)
redirect = URL('sample_set', 'all', vars={'type': defs.SET_TYPE_PATIENT, 'page': 0}, scheme=True, host=True)
res = {"redirect" : redirect}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
......@@ -148,7 +148,7 @@ def all():
start = time.time()
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}, scheme=True, host=True)))
vars=dict(_next=URL('sample_set', 'all', vars={'type': defs.SET_TYPE_PATIENT, 'page': 0}, scheme=True, host=True)))
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment