mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
ibanformat filter: don't fail on empty values
This commit is contained in:
@@ -5,4 +5,6 @@ register = template.Library()
|
||||
|
||||
@register.filter
|
||||
def ibanformat(value):
|
||||
if not value:
|
||||
return ''
|
||||
return ' '.join(value[i:i + 4] for i in range(0, len(value), 4))
|
||||
|
||||
Reference in New Issue
Block a user