mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #19370 -- Made date filter properly handle midnight value
This commit is contained in:
committed by
Claude Paroz
parent
d37483c533
commit
c10aaa70a4
@@ -704,7 +704,7 @@ def get_digit(value, arg):
|
||||
@register.filter(expects_localtime=True, is_safe=False)
|
||||
def date(value, arg=None):
|
||||
"""Formats a date according to the given format."""
|
||||
if not value:
|
||||
if value in (None, ''):
|
||||
return ''
|
||||
if arg is None:
|
||||
arg = settings.DATE_FORMAT
|
||||
|
||||
Reference in New Issue
Block a user