mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
fix(payment_methods): revert the filter for getting the mcas which are disabled (#4756)
This commit is contained in:
@ -124,9 +124,7 @@ impl MerchantConnectorAccount {
|
|||||||
if get_disabled {
|
if get_disabled {
|
||||||
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
|
generics::generic_filter::<<Self as HasTable>::Table, _, _, _>(
|
||||||
conn,
|
conn,
|
||||||
dsl::merchant_id
|
dsl::merchant_id.eq(merchant_id.to_owned()),
|
||||||
.eq(merchant_id.to_owned())
|
|
||||||
.and(dsl::disabled.eq(true)),
|
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
Some(dsl::created_at.asc()),
|
Some(dsl::created_at.asc()),
|
||||||
|
|||||||
@ -3700,7 +3700,12 @@ pub async fn get_mca_status(
|
|||||||
.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
|
.change_context(errors::ApiErrorResponse::MerchantConnectorAccountNotFound {
|
||||||
id: merchant_id.to_string(),
|
id: merchant_id.to_string(),
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let mut mca_ids = HashSet::new();
|
let mut mca_ids = HashSet::new();
|
||||||
|
let mcas = mcas
|
||||||
|
.into_iter()
|
||||||
|
.filter(|mca| mca.disabled == Some(true))
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
for mca in mcas {
|
for mca in mcas {
|
||||||
mca_ids.insert(mca.merchant_connector_id);
|
mca_ids.insert(mca.merchant_connector_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user