From 0f99b93d1e12a4fa214f8d5810a4733069e43e8c Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 12 Dec 2019 14:57:05 +0100 Subject: [PATCH] [#4801] Use Webob Request.queryvars in friendly form plugin Request.params exists in webob 1.0.8 but itchanges the wsgi environ and makes submitted form params not available later on. This will probably affect py3 as well but we are not yet at a stage where it can be tested, so we'll need to revisit it. --- ckan/lib/repoze_plugins/friendly_form.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckan/lib/repoze_plugins/friendly_form.py b/ckan/lib/repoze_plugins/friendly_form.py index 1984b4c29a8..50f1f3b5f0d 100644 --- a/ckan/lib/repoze_plugins/friendly_form.py +++ b/ckan/lib/repoze_plugins/friendly_form.py @@ -291,11 +291,11 @@ def _get_logins(self, environ, force_typecast=False): ''' try: - # Webob 1.8.5 (py3) - variables = Request(environ).params - except AttributeError: # Webob 1.0.8 (py2) variables = Request(environ).queryvars + except AttributeError: + # Webob 1.8.5 (py3) + variables = Request(environ).params failed_logins = variables.get(self.login_counter_name) if force_typecast: