mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #26129 -- Made invalid forms display initial values of disabled fields.
This commit is contained in:
@@ -167,6 +167,8 @@ class Field(object):
|
||||
For most fields, this will simply be data; FileFields need to handle it
|
||||
a bit differently.
|
||||
"""
|
||||
if self.disabled:
|
||||
return initial
|
||||
return data
|
||||
|
||||
def widget_attrs(self, widget):
|
||||
|
||||
Reference in New Issue
Block a user