From c1675cdf32b1d4a16833ffa068b540da005a2258 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 7 Aug 2024 11:40:32 +0300 Subject: [PATCH] precache-fix2 --- cache/precache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/precache.py b/cache/precache.py index 8109d039..705c9fb7 100644 --- a/cache/precache.py +++ b/cache/precache.py @@ -83,7 +83,7 @@ async def precache_data(): # topics topics = get_with_stat(select(Topic)) for topic in topics: - topic_dict = topic.dict() if not isinstance(topic, dict) else topic + topic_dict = topic.dict() if hasattr(topic, 'dict') else topic await cache_topic(topic_dict) await asyncio.gather( precache_topics_followers(topic["id"], session), precache_topics_authors(topic_dict["id"], session)