CleanDecimal can convert int float and long
This commit is contained in:
parent
43f447227a
commit
b01a6d8915
1 changed files with 3 additions and 0 deletions
|
|
@ -406,6 +406,9 @@ class CleanDecimal(CleanText):
|
|||
|
||||
@debug()
|
||||
def filter(self, text):
|
||||
if type(text) in (float, int, long):
|
||||
text = str(text)
|
||||
|
||||
if empty(text):
|
||||
return self.default_or_raise(ParseError('Unable to parse %r' % text))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue