This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user