Kaydet (Commit) 6b258bef authored tarafından Tim Graham's avatar Tim Graham

Refs #26104 -- Replaced unnecessary force_str() with force_text().

üst 4c912d18
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment