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

MultipleSelect2HiddenInput returns bad has_changed value #45

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

MultipleSelect2HiddenInput returns bad has_changed value #45

mociepka opened this issue Jun 12, 2013 · 0 comments

Comments

@mociepka
Copy link
Contributor

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.

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

No branches or pull requests

1 participant