summaryrefslogtreecommitdiff
path: root/django/template
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2017-10-02 14:49:26 +0200
committerTim Graham <timograham@gmail.com>2017-10-02 08:49:26 -0400
commitd896809a3ae8dfe45864f284c3ef45bfbb2e5ba1 (patch)
tree295f2a149d8657e8988f81f5890aee2474f9ab6d /django/template
parentf0ffa3f4ea277f9814285085fde20baff60fc386 (diff)
Refs #23919 -- Removed unneeded float()/int() calls.
Diffstat (limited to 'django/template')
-rw-r--r--django/template/defaulttags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index 5f56bb0d1f..3d97b0ceb0 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -486,7 +486,7 @@ class WidthRatioNode(Node):
value = float(value)
max_value = float(max_value)
ratio = (value / max_value) * max_width
- result = str(int(round(ratio)))
+ result = str(round(ratio))
except ZeroDivisionError:
return '0'
except (ValueError, TypeError, OverflowError):