Fixed thumbnail template tag treating provided sizes as strings, not integers

This commit is contained in:
Ilya Semenov 2013-05-25 16:45:40 +07:00
parent 0d5bfe3751
commit 761dcd20ae

View file

@ -28,7 +28,7 @@ def parse_dimensions(dimensions):
will be None for that value.
"""
width, height = [d.strip() or None for d in dimensions.split('x')]
width, height = [d.strip() and int(d) or None for d in dimensions.split('x')]
return dict(width=width, height=height)