|
|
|
@ -286,8 +286,15 @@ class Parser (Process):
|
|
|
|
|
value = row[index]
|
|
|
|
|
|
|
|
|
|
if 'cast' in config and key in config['cast'] and value.strip() != '' :
|
|
|
|
|
if config['cast'][key] in ['float','int'] and (value.isnumeric() or (len(value.split('.')) == 1) and value.replace('.','').isnumeric() ):
|
|
|
|
|
if config['cast'][key] in ['float','int']:
|
|
|
|
|
try:
|
|
|
|
|
value = eval(config['cast'][key])(value)
|
|
|
|
|
except Exception as e:
|
|
|
|
|
pass
|
|
|
|
|
#
|
|
|
|
|
# Sometimes shit hits the fan when the anchor is missing
|
|
|
|
|
# This is typical but using the hardened function helps circumvent this (SV2,SV3)
|
|
|
|
|
#
|
|
|
|
|
elif hasattr(handler,config['cast'][key]):
|
|
|
|
|
|
|
|
|
|
pointer = getattr(handler,config['cast'][key])
|
|
|
|
|