maraujop/django-crispy-forms — pull request #83 by fin (2012-08-15 17:13:45+00:00)
Title: fix ValueError occuring on foreignkeys

in modelforms when form is initialized w/ data but has not been tested for validity and a foreign object has not been chosen

form.non_field_errors implicitly calls ForeignKey.save_form_data, somehow skipping field validation., which causes a ValueError during rendering.

this is a workaround to a problem that is obviously django's fault but i figured it would be useful to have upstream.