minor fixes

This commit is contained in:
2025-05-21 22:26:39 +03:00
parent 5874d3ccae
commit 09f0747c1f
3 changed files with 31 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ def get_reactions_with_stat(q, limit=10, offset=0):
>>> get_reactions_with_stat(q, 10, 0) # doctest: +SKIP
[{'id': 1, 'body': 'Текст комментария', 'stat': {'rating': 5, 'comments_count': 3}, ...}]
"""
q = q.limit(limit).offset(offset)
q = q.distinct().limit(limit).offset(offset)
reactions = []
with local_session() as session: