Refs #26104 -- Replaced unnecessary force_str() with force_text().
This commit is contained in:
parent
4c912d184d
commit
6b258befc2
|
@ -488,7 +488,7 @@ class DurationField(Field):
|
|||
return None
|
||||
if isinstance(value, datetime.timedelta):
|
||||
return value
|
||||
value = parse_duration(force_str(value))
|
||||
value = parse_duration(force_text(value))
|
||||
if value is None:
|
||||
raise ValidationError(self.error_messages['invalid'], code='invalid')
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue