AttributeError when login form does not validate.
erikberglund opened this issue · comments
Erik Berglund commented
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
George Macon commented
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.