diff --git a/shop/templatetags/shop_tags.py b/shop/templatetags/shop_tags.py index 48316a98..189f1b26 100644 --- a/shop/templatetags/shop_tags.py +++ b/shop/templatetags/shop_tags.py @@ -6,7 +6,10 @@ register = template.Library() @register.filter def currency(value): - return "{0:.2f} DKK".format(value) + try: + return "{0:.2f} DKK".format(int(value)) + except ValueError: + return False @register.filter()