mirror of
https://github.com/pretix/pretix.git
synced 2026-09-30 19:04:43 +00:00
Apply suggestion from @pajowu
Co-authored-by: pajowu <engelhardt@pretix.eu>
This commit is contained in:
@@ -36,7 +36,7 @@ register = template.Library()
|
||||
|
||||
@register.filter("money")
|
||||
def money_filter(value: Decimal, arg='', hide_currency=False):
|
||||
if isinstance(value, (float, int)):
|
||||
if isinstance(value, (float, int, str)):
|
||||
value = Decimal(value)
|
||||
if value is None:
|
||||
value = Decimal('0.00')
|
||||
|
||||
Reference in New Issue
Block a user