This commit is contained in:
@@ -318,7 +318,9 @@ def get_shouts_with_links(
|
||||
stat = orjson.loads(row.stat)
|
||||
elif isinstance(row.stat, dict):
|
||||
stat = row.stat
|
||||
viewed = ViewedStorage.get_shout(shout_id=shout_id) or 0
|
||||
# 🔎 Получаем views_count по slug, а не по id
|
||||
shout_slug = shout_dict.get("slug", "")
|
||||
viewed = ViewedStorage.get_shout(shout_slug=shout_slug) or 0
|
||||
shout_dict["stat"] = {**stat, "views_count": viewed}
|
||||
|
||||
# Обработка main_topic и topics
|
||||
|
||||
Reference in New Issue
Block a user