mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #34424 -- Fixed SelectDateWidget crash for inputs raising OverflowError.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b4870e7196
commit
d22209cb42
@@ -1161,6 +1161,8 @@ class SelectDateWidget(Widget):
|
||||
# Return pseudo-ISO dates with zeros for any unselected values,
|
||||
# e.g. '2017-0-23'.
|
||||
return "%s-%s-%s" % (y or 0, m or 0, d or 0)
|
||||
except OverflowError:
|
||||
return "0-0-0"
|
||||
return date_value.strftime(input_format)
|
||||
return data.get(name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user