diff --git a/product/ERP5Form/CaptchaField.py b/product/ERP5Form/CaptchaField.py index 50c5ba3c4a4d34e7868ecd16aa5623c385c613a7..2f80a827352ce115edbcf3e960f04077aa76eab7 100644 --- a/product/ERP5Form/CaptchaField.py +++ b/product/ERP5Form/CaptchaField.py @@ -312,14 +312,16 @@ class CaptchaField(ZMIField): security.declareProtected('Access contents information', 'get_value') def get_value(self, id, **kw): - if self.values.has_key(id): + if id in self.getCaptchaCustomPropertyList(): return self.values[id] return ZMIField.get_value(self, id, **kw) def getCaptchaCustomPropertyList(self): - captcha_type = self.get_value("captcha_type") + if hasattr(self, "__extraPropertyList"): + return self.__extraPropertyList + captcha_type = ZMIField.get_value(self, "captcha_type") captcha_provider = CaptchaProviderFactory.getProvider(captcha_type) extraPropertyList = captcha_provider.getExtraPropertyList() self.__extraPropertyList = [x.id for x in extraPropertyList] return extraPropertyList - \ No newline at end of file +