Kaynağa Gözat

Fix very strange cache bug

This happened once and I have no idea why, but it shouldn't cause a crash.
Zed 6 yıl önce
ebeveyn
işleme
548cb62ff2
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/redis_cache.nim

+ 1 - 1
src/redis_cache.nim

@@ -115,4 +115,4 @@ proc getCachedRss*(key: string): Future[(string, string)] {.async.} =
     res = await r.hgetall("rss:" & key)
 
   if "rss" in res:
-    result = (res["rss"], res["min"])
+    result = (res["rss"], res.getOrDefault("min"))