Skip to content

Commit

Permalink
payment: fix allocation released filter
Browse files Browse the repository at this point in the history
payment: fix again
  • Loading branch information
kamirr committed Jul 9, 2024
1 parent e85ea62 commit ccf8016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/payment/src/dao/allocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl<'c> AllocationDao<'c> {
readonly_transaction(self.pool, "allocation_dao_get_filtered", move |conn| {
let mut query = dsl::pay_allocation.into_boxed();
if let Some(released) = released {
query = query.filter(dsl::released.eq(false));
query = query.filter(dsl::released.eq(released));
}
if let Some(owner_id) = owner_id {
query = query.filter(dsl::owner_id.eq(owner_id))
Expand Down
4 changes: 2 additions & 2 deletions core/payment/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,10 @@ impl PaymentProcessor {
let dao = db.as_dao::<AllocationDao>();

let active = dao
.get_for_address(platform.clone(), address.clone(), None)
.get_for_address(platform.clone(), address.clone(), Some(false))
.await?;
let past = dao
.get_for_address(platform.clone(), address.clone(), None)
.get_for_address(platform.clone(), address.clone(), Some(true))
.await?;

(active, past)
Expand Down

0 comments on commit ccf8016

Please sign in to comment.