summaryrefslogtreecommitdiff
path: root/django/forms/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/forms.py')
-rw-r--r--django/forms/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index c5b190bdf5..509709f084 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -620,7 +620,7 @@ class BoundField(object):
# If this is an auto-generated default date, nix the
# microseconds for standardized handling. See #22502.
if (isinstance(data, (datetime.datetime, datetime.time)) and
- not getattr(self.field.widget, 'supports_microseconds', True)):
+ not self.field.widget.supports_microseconds):
data = data.replace(microsecond=0)
self._initial_value = data
else: