fix too many topics

This commit is contained in:
tonyrewin 2022-09-06 10:58:01 +03:00
parent 9519876d05
commit feeef817c1

View File

@ -93,4 +93,4 @@ async def topics_random(_, info):
topic.stat = topic_stat topic.stat = topic_stat
if topic_stat["shouts"] > 2: if topic_stat["shouts"] > 2:
normalized_topics.push(topic) normalized_topics.push(topic)
return random.choices(topics, k=12) return random.choices(topics, k=12)[0:12]