From cffc7ac5246160a37bed31b5bdf57e990c45ba00 Mon Sep 17 00:00:00 2001 From: Kyle Espinola Date: Wed, 18 Oct 2023 12:55:21 +0200 Subject: [PATCH] fix: supply loader dont use return from redis --- api/src/dataloaders/collection.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/dataloaders/collection.rs b/api/src/dataloaders/collection.rs index 4ace927..b129d54 100644 --- a/api/src/dataloaders/collection.rs +++ b/api/src/dataloaders/collection.rs @@ -215,11 +215,11 @@ impl DataLoader for SupplyLoader { .collect::>(); 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, Option>(&redis_key, Some(count)) + redis_connection + .set::<_, Option, Option>(&redis_key, count) .await?; results.insert(key, count);