Explorar o código

Fix very strange cache bug

This happened once and I have no idea why, but it shouldn't cause a crash.
Zed %!s(int64=6) %!d(string=hai) anos
pai
achega
548cb62ff2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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"))