jazzband / django-formtools

A set of high-level abstractions for Django forms
https://django-formtools.readthedocs.io
BSD 3-Clause "New" or "Revised" License
814 stars 136 forks source link

Missing management data causes a 500 error #118

Closed moggers87 closed 6 years ago

moggers87 commented 6 years ago

While investigating https://github.com/Bouke/django-two-factor-auth/issues/243 I noticed that django-formtools suffers from the same issue: missing mangement data causes a ValidationError to be raised in the view, which is uncaught and produces a HTTP 500 response.

This behaviour is unexpected and I think it makes more sense to return a HTTP 400 (Bad Request). Pull request to follow shortly.