fmt
All checks were successful
Deploy on push / deploy (push) Successful in 7s

This commit is contained in:
2024-12-11 23:02:14 +03:00
parent c5d21c3554
commit fbcee18db1
6 changed files with 21 additions and 29 deletions

View File

@@ -161,9 +161,9 @@ def query_with_stat(info):
)
.filter(Reaction.reply_to.is_(None))
.label("rating"),
func.max(Reaction.created_at).filter(Reaction.kind == ReactionKind.COMMENT.value).label(
"last_commented_at"
),
func.max(Reaction.created_at)
.filter(Reaction.kind == ReactionKind.COMMENT.value)
.label("last_commented_at"),
)
.where(Reaction.deleted_at.is_(None))
.group_by(Reaction.shout)
@@ -177,7 +177,7 @@ def query_with_stat(info):
"rating",
func.coalesce(stats_subquery.c.rating, 0),
"last_commented_at",
func.coalesce(stats_subquery.c.last_commented_at, 0)
func.coalesce(stats_subquery.c.last_commented_at, 0),
).label("stat")
)