From e566a4eff2270c2a56ec90966f42ccfd79906068 Mon Sep 17 00:00:00 2001 From: Kartikeya Hegde Date: Tue, 21 Nov 2023 15:41:35 +0530 Subject: [PATCH] fix: merchant_connector_id null in KV flow (#2810) Co-authored-by: preetamrevankar <132073736+preetamrevankar@users.noreply.github.com> --- crates/diesel_models/src/payment_attempt.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/diesel_models/src/payment_attempt.rs b/crates/diesel_models/src/payment_attempt.rs index bb8f2b60bbb7..f77e75491d86 100644 --- a/crates/diesel_models/src/payment_attempt.rs +++ b/crates/diesel_models/src/payment_attempt.rs @@ -359,7 +359,9 @@ impl PaymentAttemptUpdate { .amount_capturable .unwrap_or(source.amount_capturable), updated_by: pa_update.updated_by, - merchant_connector_id: pa_update.merchant_connector_id, + merchant_connector_id: pa_update + .merchant_connector_id + .or(source.merchant_connector_id), authentication_data: pa_update.authentication_data.or(source.authentication_data), encoded_data: pa_update.encoded_data.or(source.encoded_data), unified_code: pa_update.unified_code.unwrap_or(source.unified_code),