ismain-field
Some checks failed
Deploy on push / deploy (push) Failing after 10s

This commit is contained in:
Untone 2024-10-31 15:18:27 +03:00
parent 2bc0ac1cff
commit 21888c6d00

View File

@ -267,7 +267,10 @@ def get_shouts_with_stats(q, limit=20, offset=0, author_id=None):
for author in authors: for author in authors:
author.caption = captions.get(author.id, "") author.caption = captions.get(author.id, "")
shout.authors = authors shout.authors = authors
shout.topics = [Topic(**topic) for topic in topics_json] if topics_json else [] topics = [Topic(**topic) for topic in topics_json] if topics_json else []
for topic in topics:
topic.is_main = topic.slug == main_topic_slug
shout.topics = topics
shout.stat = { shout.stat = {
"viewed": ViewedStorage.get_shout(shout.id), "viewed": ViewedStorage.get_shout(shout.id),
"rating": rating_stat or 0, "rating": rating_stat or 0,