healthequity: ignore balance-after when merging #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The healthequity source merges newly-downloaded transaction data into the
previously-saved file. This failed when there were multiple transactions of
the same type in a single day, because the order in which HealthEquity reports
transactions is not stable and so the running balances were not either. The
result was that past transactions would sometimes be spontaneously duplicated
in the list upon a new finance-dl run.
This change causes the merge process to ignore the "Balance After" column.
This also means that the running balance within a day may end up incorrect,
if newly-available transactions happen to be listed before
previously-available ones in the new download. There's no really good way to
prevent this except either recalculating the balance-after column ourselves
after the merge or throwing it out entirely, neither of which is proposed in
this change.