mirror of
https://github.com/janeczku/calibre-web
synced 2025-01-02 21:40:30 +00:00
Possible fix for #3230
This commit is contained in:
parent
6cb1449ff3
commit
2bfbbfd4ba
@ -111,7 +111,7 @@ def yesno(value, yes, no):
|
||||
|
||||
@jinjia.app_template_filter('formatfloat')
|
||||
def formatfloat(value, decimals=1):
|
||||
if not value:
|
||||
if not value or (isinstance(value, str) and not value.is_numeric()):
|
||||
return value
|
||||
formated_value = ('{0:.' + str(decimals) + 'f}').format(value)
|
||||
if formated_value.endswith('.' + "0" * decimals):
|
||||
|
Loading…
Reference in New Issue
Block a user