groupbyfix

This commit is contained in:
2024-08-07 11:52:07 +03:00
parent c1675cdf32
commit 1b46184781
2 changed files with 18 additions and 11 deletions

3
cache/precache.py vendored
View File

@@ -81,7 +81,8 @@ async def precache_data():
with local_session() as session:
# topics
topics = get_with_stat(select(Topic))
q = select(Topic).where(Topic.community == 1)
topics = get_with_stat(q)
for topic in topics:
topic_dict = topic.dict() if hasattr(topic, 'dict') else topic
await cache_topic(topic_dict)