Merge pull request 'improved storing' (#457) from mntx-452 into main
All checks were successful
ci/woodpecker/push/gateway_mntx Pipeline was successful

Reviewed-on: #457
This commit was merged in pull request #457.
This commit is contained in:
2026-02-10 13:20:17 +00:00

View File

@@ -107,6 +107,7 @@ func (p *cardPayoutProcessor) Submit(ctx context.Context, req *mntxv1.CardPayout
// Keep CreatedAt/refs if record already exists.
if existing, err := p.store.Payouts().FindByPaymentID(ctx, state.PaymentRef); err == nil && existing != nil {
state.ID = existing.ID // preserve ID for upsert
if !existing.CreatedAt.IsZero() {
state.CreatedAt = existing.CreatedAt
}