Commit 32f0f555 by Alexander Kryklia Committed by polesye

Use more clean expression.

parent 3c4f71bb
......@@ -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):
......
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