fix match_form_params according to docstring stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 03 Jul 2009 16:50:13 +0200
branchstable
changeset 2254 f632b06058c4
parent 2253 0727550c64e2
child 2255 c346af0727ca
child 2261 7e635be2c4b2
fix match_form_params according to docstring
selectors.py
--- a/selectors.py	Fri Jul 03 10:27:13 2009 +0200
+++ b/selectors.py	Fri Jul 03 16:50:13 2009 +0200
@@ -482,8 +482,7 @@
     def __call__(self, cls, req, *args, **kwargs):
         score = 0
         for param in self.expected:
-            val = req.form.get(param)
-            if not val:
+            if not param in req.form:
                 return 0
             score += 1
         return len(self.expected)