CleanDecimal can convert int float and long

This commit is contained in:
Vincent Paredes 2015-08-05 16:29:42 +02:00 committed by Romain Bignon
commit b01a6d8915

View file

@ -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))