mirror of
https://github.com/django/django.git
synced 2025-07-25 14:14:13 +00:00
Fixed #16612 -- Improved has_changed detection for localized field values
Thanks Simon Charette for the review.
This commit is contained in:
parent
0c82b1dfc4
commit
892bc91cb0
5 changed files with 53 additions and 28 deletions
|
@ -345,8 +345,8 @@ class BaseForm(object):
|
|||
else:
|
||||
initial_prefixed_name = self.add_initial_prefix(name)
|
||||
hidden_widget = field.hidden_widget()
|
||||
initial_value = hidden_widget.value_from_datadict(
|
||||
self.data, self.files, initial_prefixed_name)
|
||||
initial_value = field.to_python(hidden_widget.value_from_datadict(
|
||||
self.data, self.files, initial_prefixed_name))
|
||||
if hasattr(field.widget, '_has_changed'):
|
||||
warnings.warn("The _has_changed method on widgets is deprecated,"
|
||||
" define it at field level instead.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue