setup: allow num2words >= 0.5.9 (#82017)
gitea/hobo/pipeline/head There was a failure building this commit
Details
gitea/hobo/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
78d41f6316
commit
67609853be
|
@ -57,7 +57,8 @@ def as_numeral_currency(number):
|
|||
if not number:
|
||||
return ''
|
||||
try:
|
||||
return num2words(unlazy(number), lang=get_language(), to='currency')
|
||||
# workaround newer num2words always specifiying cents
|
||||
return num2words(unlazy(number), lang=get_language(), to='currency').removesuffix(' et zéro centimes')
|
||||
except (TypeError, ValueError, decimal.InvalidOperation):
|
||||
return ''
|
||||
|
||||
|
|
Loading…
Reference in New Issue