query-fix
This commit is contained in:
@@ -380,6 +380,8 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
|
|||||||
q = q.where(Reaction.deleted_at.is_(None))
|
q = q.where(Reaction.deleted_at.is_(None))
|
||||||
q = q.limit(limit).offset(offset)
|
q = q.limit(limit).offset(offset)
|
||||||
reactions = []
|
reactions = []
|
||||||
|
with local_session() as session:
|
||||||
|
result_rows = session.execute(q)
|
||||||
for [
|
for [
|
||||||
reaction,
|
reaction,
|
||||||
author,
|
author,
|
||||||
@@ -387,7 +389,7 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
|
|||||||
reacted_stat,
|
reacted_stat,
|
||||||
commented_stat,
|
commented_stat,
|
||||||
rating_stat,
|
rating_stat,
|
||||||
] in local_session().execute(q):
|
] in result_rows:
|
||||||
reaction.created_by = author
|
reaction.created_by = author
|
||||||
reaction.shout = shout
|
reaction.shout = shout
|
||||||
reaction.stat = {
|
reaction.stat = {
|
||||||
|
|||||||
Reference in New Issue
Block a user