Skip to content

Commit

Permalink
fix(db): fix unwind stage in receipt queries (#786)
Browse files Browse the repository at this point in the history
fix unwind
  • Loading branch information
Alex6323 authored Oct 11, 2022
1 parent 3af58ea commit 4ab1951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/collections/milestone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl MilestoneCollection {
Ok(self
.aggregate::<ReceiptAtIndex>(
vec![
doc! { "$unwind": "payload.essence.options"},
doc! { "$unwind": "$payload.essence.options"},
doc! { "$match": {
"payload.essence.options.receipt.migrated_at": { "$exists": true },
} },
Expand Down Expand Up @@ -303,7 +303,7 @@ impl MilestoneCollection {
Ok(self
.aggregate(
vec![
doc! { "$unwind": "payload.essence.options"},
doc! { "$unwind": "$payload.essence.options"},
doc! { "$match": {
"payload.essence.options.receipt.migrated_at": { "$and": [ { "$exists": true }, { "$eq": migrated_at } ] },
} },
Expand Down

0 comments on commit 4ab1951

Please sign in to comment.