Skip to content

empty text fields not handled properly in convert() #188

@isaacnorman82

Description

@isaacnorman82

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions