perbaikan pengecekan captcha untuk permintaan non-XHR pada fungsi login

1 parent 6cf50b81
...@@ -66,7 +66,7 @@ class Login(CSRFSchema): ...@@ -66,7 +66,7 @@ class Login(CSRFSchema):
def after_bind(self, schema, kwargs): def after_bind(self, schema, kwargs):
# super().after_bind(schema, kwargs) # super().after_bind(schema, kwargs)
request = kwargs["request"] request = kwargs["request"]
if BASE_CLASS.login_captcha: if BASE_CLASS.login_captcha and not request.is_xhr:
self["captcha"] = colander.SchemaNode( self["captcha"] = colander.SchemaNode(
colander.String(), colander.String(),
widget=widget_os.CaptchaWidget( widget=widget_os.CaptchaWidget(
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!