Skip to content

Commit

Permalink
Replace recursion with absolute value in utils.core.timedelta_f (apac…
Browse files Browse the repository at this point in the history
  • Loading branch information
benvdh committed Sep 21, 2019
1 parent 9733276 commit 279e530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def timedelta_f(td: timedelta) -> str:
'-1 day, 5:06:00'
"""
if td < timedelta(0):
return "-" + timedelta_f(-td)
return "-" + str(abs(td))
else:
# Change this to format positive timedeltas the way you want
return str(td)
Expand Down

0 comments on commit 279e530

Please sign in to comment.