whensfix
Some checks failed
Deploy on push / deploy (push) Failing after 10s

This commit is contained in:
Untone 2024-10-31 14:29:47 +03:00
parent 9416165699
commit 882ef0288a

View File

@ -225,8 +225,8 @@ def get_shouts_with_stats(q, limit=20, offset=0, author_id=None):
func.count(distinct(Reaction.id)).label("comments_stat"),
func.sum(
case(
[(Reaction.kind == "LIKE", 1),
(Reaction.kind == "DISLIKE", -1)],
(Reaction.kind == ReactionKind.LIKE.value, 1),
(Reaction.kind == ReactionKind.DISLIKE.value, -1),
else_=0
)
).label("rating_stat"),