Skip to content

Commit

Permalink
fix(api): deserialization error in `api/analytics/v2/ledger/storage-d…
Browse files Browse the repository at this point in the history
…eposit` (#762)

Fix storage deposit deserialization when no records exist
  • Loading branch information
Alexandcoats authored Sep 30, 2022
1 parent 9bafb00 commit 7be594e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/collections/outputs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,9 @@ impl OutputCollection {
},
doc! { "$project": {
"output_count": { "$first": "$all.output_count" },
"storage_deposit_return_count": { "$first": "$storage_deposit.return_count" },
"storage_deposit_return_count": { "$ifNull": [ { "$first": "$storage_deposit.return_count" }, 0 ] },
"storage_deposit_return_total_value": {
"$toString": { "$first": "$storage_deposit.return_total_value" }
"$toString": { "$ifNull": [ { "$first": "$storage_deposit.return_total_value" }, 0 ] }
},
"total_key_bytes": {
"$toString": { "$first": "$all.total_key_bytes" }
Expand Down

0 comments on commit 7be594e

Please sign in to comment.