bugfix: date pasing

This commit is contained in:
Steve Nyemba 2021-05-03 14:39:14 -05:00
parent 18457a8253
commit 0bf38ccd33
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ class Parser (Process):
value = row[index] value = row[index]
if 'cast' in config and key in config['cast'] and value.strip() != '' : if 'cast' in config and key in config['cast'] and value.strip() != '' :
if config['cast'][key] in ['float','int'] : if config['cast'][key] in ['float','int'] and (value.replace.isnumeric() or (len(value.split('.')) == 1) and value.replace('.','').isnumeric() ):
value = eval(config['cast'][key])(value) value = eval(config['cast'][key])(value)
elif hasattr(handler,config['cast'][key]): elif hasattr(handler,config['cast'][key]):