1
0
mirror of https://github.com/django/django.git synced 2025-10-27 15:46:10 +00:00

Fixed #24428 -- Fixed has_changed for fields with coercion

Thanks Carsten Fuchs for the report.
This commit is contained in:
Claude Paroz
2015-03-04 20:19:02 +01:00
parent 767c33d1fa
commit 8714403614
4 changed files with 57 additions and 2 deletions

View File

@@ -195,6 +195,7 @@ class Field(six.with_metaclass(RenameFieldMethods, object)):
data = self.to_python(data)
if hasattr(self, '_coerce'):
data = self._coerce(data)
initial_value = self._coerce(initial_value)
except ValidationError:
return True
data_value = data if data is not None else ''