Skip to content
Snippets Groups Projects
Commit 32f0f555 authored by Alexander Kryklia's avatar Alexander Kryklia Committed by polesye
Browse files

Use more clean expression.

parent 3c4f71bb
No related branches found
No related tags found
No related merge requests found
......@@ -194,8 +194,7 @@ class RelativeTime(Field):
return "00:00:00"
if isinstance(value, float): # backward compatibility
if value > 86400:
value = 86400
value = min(value, 86400)
return self.timedelta_to_string(datetime.timedelta(seconds=value))
if isinstance(value, datetime.timedelta):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment