ofxtools
ofxtools copied to clipboard
empty text fields not handled properly in convert()
I have an ofx file with a STMTTRN that has an empty MEMO.
During the convert() operation I was getting an error because MEMO was not found in the models attributes.
I believe this is because the code is incorrectly treating an empty text node as a node that needs to be recursed into.
I was able to resolve the issue by changing the check 'elif elem.text' inside base.py update_args() to be 'elif elem.text or len(elem) == 0'. Basically if there are no children to recurse into treat it as text. Not sure if this is 100% correct but the code here is a bit hard to read.