From 1c39cc1262e6b2521669639ae296211b7ebefd86 Mon Sep 17 00:00:00 2001 From: Kashif Date: Wed, 4 Sep 2024 14:55:31 +0530 Subject: [PATCH] fix(payout): query for getting a list of active payout IDs (#5771) --- crates/storage_impl/src/payouts/payouts.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/storage_impl/src/payouts/payouts.rs b/crates/storage_impl/src/payouts/payouts.rs index 320aee2006..3a5cc2854e 100644 --- a/crates/storage_impl/src/payouts/payouts.rs +++ b/crates/storage_impl/src/payouts/payouts.rs @@ -584,6 +584,7 @@ impl PayoutsInterface for crate::RouterStore { diesel_models::schema::customers::table .on(cust_dsl::customer_id.nullable().eq(po_dsl::customer_id)), ) + .filter(cust_dsl::merchant_id.eq(merchant_id.to_owned())) .filter(po_dsl::merchant_id.eq(merchant_id.to_owned())) .order(po_dsl::created_at.desc()) .into_boxed(); @@ -785,6 +786,7 @@ impl PayoutsInterface for crate::RouterStore { .on(cust_dsl::customer_id.nullable().eq(po_dsl::customer_id)), ) .select(po_dsl::payout_id) + .filter(cust_dsl::merchant_id.eq(merchant_id.to_owned())) .filter(po_dsl::merchant_id.eq(merchant_id.to_owned())) .order(po_dsl::created_at.desc()) .into_boxed();