From 6ff5679d8e779212f0c8d10fe733c25701359d70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr>
Date: Fri, 20 Jul 2018 15:41:39 +0200
Subject: [PATCH] correct slider default value is cutoff value is "minimal
 value"

cf #67


Former-commit-id: 76ab2801d1fe8455d132d103d8ec635c3249c9ce
---
 ippisite/ippidb/views.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ippisite/ippidb/views.py b/ippisite/ippidb/views.py
index 1c909bb6..704eb6bb 100644
--- a/ippisite/ippidb/views.py
+++ b/ippisite/ippidb/views.py
@@ -146,8 +146,10 @@ def process_cutoff_value(name, context, request, cutoff_dir='l'):
         context[name] = request.GET.get(name)
         filter_dict = {name + '__' + cutoff_dir + 'te': context[name]}
         context['compounds'] = context['compounds'].filter(**filter_dict)
-    else:
+    elif cutoff_dir == 'l':
         context[name] = context[name+'_max']
+    else:
+        context[name] = context[name+'_min']
     return context
 
 def compound_list(request):
-- 
GitLab