Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
761df5dd9e
|
@ -14,7 +14,7 @@ from orm.user import User
|
||||||
def add_reaction_stat_columns(q):
|
def add_reaction_stat_columns(q):
|
||||||
aliased_reaction = aliased(Reaction)
|
aliased_reaction = aliased(Reaction)
|
||||||
|
|
||||||
q = q.outerjoin(aliased_reaction).add_columns(
|
q = q.outerjoin(aliased_reaction, Reaction.id == aliased_reaction.replyTo).add_columns(
|
||||||
func.sum(
|
func.sum(
|
||||||
aliased_reaction.id
|
aliased_reaction.id
|
||||||
).label('reacted_stat'),
|
).label('reacted_stat'),
|
||||||
|
@ -325,6 +325,9 @@ async def load_reactions_by(_, _info, by, limit=50, offset=0):
|
||||||
"commented": commented_stat,
|
"commented": commented_stat,
|
||||||
"reacted": reacted_stat
|
"reacted": reacted_stat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reaction.kind = reaction.kind.name
|
||||||
|
|
||||||
reactions.append(reaction)
|
reactions.append(reaction)
|
||||||
|
|
||||||
# ?
|
# ?
|
||||||
|
|
Loading…
Reference in New Issue
Block a user