Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError when login form does not validate. #76

Open
erikberglund opened this issue Oct 10, 2019 · 1 comment
Open

AttributeError when login form does not validate. #76

erikberglund opened this issue Oct 10, 2019 · 1 comment

Comments

@erikberglund
Copy link

I get the following error when a user tries to log in with invalid credentials:

ERROR:flask.app:Exception on /api/auth/login [POST]
Traceback (most recent call last):
    File "/var/www/site/backend/auth/api.py", line 42, in post
        if form.validate_ldap():
    File "/var/www/site/venv/lib/python3.6/site-packages/flask_ldap3_login/forms.py", line 51, in validate_ldap
        self.username.errors.append('Invalid Username/Password.')
AttributeError: 'tuple' object has no attribute 'append'

So something might have changed in a WTForms update to make the errors object a tuple?

I'm using:

  • Python 3.6
  • flask-ldap3-login 0.9.16
  • WTForms 2.2.1
@gmacon
Copy link
Collaborator

gmacon commented Oct 10, 2019

That seems like a reasonable hypothesis. Next action here is probably to investigate the Flask-WTF and WTForms change logs to identify an appropriate minimum version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants