refactor(refunds): add success RefundStatus in should_call_refund check (#2081)

This commit is contained in:
Kritik Modi
2023-09-06 17:16:24 +05:30
committed by GitHub
parent d4221f3368
commit 9cae5de5ff
2 changed files with 2 additions and 1 deletions

View File

@ -939,7 +939,7 @@ impl From<ErrorDetails> for utils::ErrorCodeAndMessage {
fn from(error: ErrorDetails) -> Self {
Self {
error_code: error.code.to_string(),
error_message: error.error_name.unwrap_or(error.code.to_string()),
error_message: error.error_name.unwrap_or(error.code),
}
}
}

View File

@ -356,6 +356,7 @@ fn should_call_refund(refund: &diesel_models::refund::Refund, force_sync: bool)
|| !matches!(
refund.refund_status,
diesel_models::enums::RefundStatus::Failure
| diesel_models::enums::RefundStatus::Success
);
predicate1 && predicate2