Add template multiply test
This commit is contained in:
1 parent
7805d2800c
commit
9f5f13644a
2 files changed
+14
-1
No files matched your search
@@ -162,7 +162,7 @@ def multiply(value, amount):
|
||||
"""Filter to convert value to float and multiply it."""
|
||||
try:
|
||||
return float(value) * amount
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
# If value can't be converted to float
|
||||
return value
|
||||
|
||||
|
||||
Reference in new issue
Block a user