Skip to content

Commit

Permalink
fix: supply loader dont use return from redis
Browse files Browse the repository at this point in the history
  • Loading branch information
kespinola committed Oct 18, 2023
1 parent e028f8b commit cffc7ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/src/dataloaders/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ impl DataLoader<Uuid> for SupplyLoader {
.collect::<HashMap<_, _>>();

for key in computed_supplies {
let count = count_results.get(&key).copied().unwrap_or_default();
let count = count_results.get(&key).copied();
let redis_key = format!("collection:{key}:supply");

let count = redis_connection
.set::<_, Option<i64>, Option<i64>>(&redis_key, Some(count))
redis_connection
.set::<_, Option<i64>, Option<i64>>(&redis_key, count)
.await?;

results.insert(key, count);
Expand Down

0 comments on commit cffc7ac

Please sign in to comment.