This commit is contained in:
parent
02b2aad813
commit
02b504cc4f
|
@ -356,10 +356,9 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
q = (
|
q = (
|
||||||
select(Reaction, Author, Shout)
|
select([Reaction, Author, Shout])
|
||||||
.join(Author, Reaction.created_by == Author.id)
|
.join(Author, Reaction.created_by == Author.id)
|
||||||
.join(Shout, Reaction.shout == Shout.id)
|
.join(Shout, Reaction.shout == Shout.id)
|
||||||
.distinct() # Применяем DISTINCT здесь
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# calculate counters
|
# calculate counters
|
||||||
|
|
Loading…
Reference in New Issue
Block a user