mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #27431 -- Prevented disabled form fields from appearing as changed.
This commit is contained in:
committed by
Tim Graham
parent
7b05ffd95d
commit
8618a7eaa1
@@ -187,6 +187,10 @@ class Field(object):
|
||||
"""
|
||||
Return True if data differs from initial.
|
||||
"""
|
||||
# Always return False if the field is disabled since self.bound_data
|
||||
# always uses the initial value in this case.
|
||||
if self.disabled:
|
||||
return False
|
||||
try:
|
||||
data = self.to_python(data)
|
||||
if hasattr(self, '_coerce'):
|
||||
|
||||
Reference in New Issue
Block a user