diff --git a/product/ERP5Form/CaptchaField.py b/product/ERP5Form/CaptchaField.py index 65033b6af37481d2cb6347dc40d4a1266e7129e7..13b0fc1f494d359ac05d7be3f48f0cf6a13f3ea2 100644 --- a/product/ERP5Form/CaptchaField.py +++ b/product/ERP5Form/CaptchaField.py @@ -115,7 +115,7 @@ class NumericCaptchaProvider(object): def generate(self, field): # First step : generate the calculus. It is really simple. - terms = [str(random.randint(1, 20)), random.choice(self.operator_set.keys())] + terms = [str(random.randint(1, 20)), random.choice(list(self.operator_set.keys()))] #XXX: Find a way to prevent too complex captchas (for instance 11*7*19...) #terms += [str(random.randint(1, 20)), random.choice(operator_set.keys())] terms.append(str(random.randint(1, 20)))