From ef6814d4529e7a817bafdfe04150524d36d86ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Fri, 1 Mar 2019 15:05:26 +0000 Subject: [PATCH] py3 compat Fixes #2114 --- gluon/contrib/webclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/contrib/webclient.py b/gluon/contrib/webclient.py index 6454e97f..beac2ff9 100644 --- a/gluon/contrib/webclient.py +++ b/gluon/contrib/webclient.py @@ -121,7 +121,7 @@ class WebClient(object): self.method = 'POST' if method=='auto' else method # if there is only one form, set _formname automatically if not '_formname' in data and len(self.forms) == 1: - data['_formname'] = self.forms.keys()[0] + data['_formname'] = next(iter(self.forms.keys())) # Use the first key # if there is no formkey but it is known, set it if '_formname' in data and not '_formkey' in data and \