tricky-followers-count
Some checks failed
Deploy on push / deploy (push) Failing after 9s

This commit is contained in:
Untone 2024-08-07 18:09:44 +03:00
parent 8b377123e1
commit 87aa39959a

View File

@ -82,9 +82,7 @@ def query_shouts():
Shout,
ShoutReactionsFollower,
func.count(case((aliased_reaction.body.is_not(None), 1))).label("comments_stat"),
func.count(ShoutReactionsFollower.follower)
.filter(ShoutReactionsFollower.shout == Shout.id)
.label("followers_stat"),
func.count(distinct(aliased_reaction.created_by)).label("followers_stat"),
func.sum(
case(
(aliased_reaction.kind == ReactionKind.LIKE.value, 1),
@ -104,8 +102,6 @@ def query_shouts():
Shout.id,
authors_subquery.c.authors,
topics_subquery.c.topics,
ShoutReactionsFollower.follower,
ShoutReactionsFollower.shout,
)
)