summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 47396213d9..498185fe23 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -474,7 +474,7 @@ class DateTimeBaseInput(TextInput):
def __init__(self, attrs=None, format=None):
super().__init__(attrs)
- self.format = format if format else None
+ self.format = format or None
def format_value(self, value):
return formats.localize_input(value, self.format or formats.get_format(self.format_key)[0])