MultipleSelect2HiddenInput returns bad has_changed value #45

Closed
mociepka opened this Issue Jun 12, 2013 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

mociepka commented Jun 12, 2013

MultipleSelect2HiddenInput extends forms.TextInput that widget gets his _has_changed from Widget class: https://github.com/django/django/blob/stable/1.5.x/django/forms/widgets.py#L211.

That function is not good for many value widgets because for initial values: None, [] it returns True...

You have to use _has_changed from: https://github.com/django/django/blob/stable/1.5.x/django/forms/widgets.py#L642.

This problem occurred when I try use that field in formset. Formset validates only changed forms, so now it will validate all forms in formset even extra ones.

applegrew closed this in ddbbb6a Jun 12, 2013

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