Просмотр исходного кода

Fix typo to actually cache pinned tweets

Zed 3 лет назад
Родитель
Сommit
22b51b414b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/redis_cache.nim

+ 1 - 1
src/redis_cache.nim

@@ -154,7 +154,7 @@ proc getCachedTweet*(id: int64): Future[Tweet] {.async.} =
     tweet.deserialize(Tweet)
     tweet.deserialize(Tweet)
   else:
   else:
     result = await getStatus($id)
     result = await getStatus($id)
-    if result.isNil:
+    if not result.isNil:
       await cache(result)
       await cache(result)
 
 
 proc getCachedPhotoRail*(name: string): Future[PhotoRail] {.async.} =
 proc getCachedPhotoRail*(name: string): Future[PhotoRail] {.async.} =