mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Added missing return value to DurationField.prepare_value(); refs #24339.
This commit is contained in:
committed by
Tim Graham
parent
a73c8540a8
commit
49647bec6e
@@ -516,6 +516,7 @@ class DurationField(Field):
|
||||
def prepare_value(self, value):
|
||||
if isinstance(value, datetime.timedelta):
|
||||
return duration_string(value)
|
||||
return value
|
||||
|
||||
def to_python(self, value):
|
||||
if value in self.empty_values:
|
||||
|
||||
Reference in New Issue
Block a user