Skip to content

Commit

Permalink
Add comment for edge case of 1 acct with 2+ groups
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamacker committed Aug 20, 2024
1 parent 422ae2e commit e3be87a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/util/ledger/util/registers_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ func NewByAccountRegistersFromPayloadAccountGrouping(
for accountRegisters := range results {
oldAccountRegisters := registersByAccount.SetAccountRegisters(accountRegisters)
if oldAccountRegisters != nil {
// TODO: check full migration logs to see if this edge case of multiple groups
// for an account still exists. If it still exists, create an issue to fix it.
// Otherwise, we can treat this as error and panic (instead of merging groups).

// Account grouping should never create multiple groups for an account.
// In case it does anyway, merge the groups together,
// by merging the existing registers into the new ones.
Expand Down

0 comments on commit e3be87a

Please sign in to comment.