fix ReadableInteger filter
This commit is contained in:
parent
6b675afab9
commit
27fcaee0cd
@ -1,3 +1,5 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
def iconSvg(name):
|
def iconSvg(name):
|
||||||
with open('static/icons/'+name+'.svg') as contents:
|
with open('static/icons/'+name+'.svg') as contents:
|
||||||
return contents.read()
|
return contents.read()
|
||||||
@ -18,7 +20,7 @@ def usPhone(number):
|
|||||||
|
|
||||||
def readableInteger(value):
|
def readableInteger(value):
|
||||||
try:
|
try:
|
||||||
numberValue = float(value)
|
numberValue = int(value)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
numberValue = 0
|
numberValue = 0
|
||||||
return "{:,}".format(numberValue)
|
return "{:,}".format(numberValue)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user