Skip to content

Commit

Permalink
[#4801] Use Webob Request.queryvars in friendly form plugin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
amercader committed Dec 12, 2019
1 parent c895443 commit 0f99b93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/repoze_plugins/friendly_form.py
Expand Up @@ -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:
Expand Down

0 comments on commit 0f99b93

Please sign in to comment.