mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
This reverts commit edde2a0699.
Thanks Jan Pieter Waagmeester for the report.
This commit is contained in:
committed by
Mariusz Felisiak
parent
fbde929b19
commit
51faf4bd17
@@ -174,10 +174,6 @@ class BaseForm(RenderableFormMixin):
|
||||
|
||||
def __getitem__(self, name):
|
||||
"""Return a BoundField with the given name."""
|
||||
try:
|
||||
return self._bound_fields_cache[name]
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
field = self.fields[name]
|
||||
except KeyError:
|
||||
@@ -189,9 +185,9 @@ class BaseForm(RenderableFormMixin):
|
||||
", ".join(sorted(self.fields)),
|
||||
)
|
||||
)
|
||||
bound_field = field.get_bound_field(self, name)
|
||||
self._bound_fields_cache[name] = bound_field
|
||||
return bound_field
|
||||
if name not in self._bound_fields_cache:
|
||||
self._bound_fields_cache[name] = field.get_bound_field(self, name)
|
||||
return self._bound_fields_cache[name]
|
||||
|
||||
@property
|
||||
def errors(self):
|
||||
|
||||
Reference in New Issue
Block a user