int-id-fix
All checks were successful
Deploy on push / deploy (push) Successful in 5m45s

This commit is contained in:
2024-02-24 21:15:11 +03:00
parent 5e72a08e0f
commit d7c9622ffa
6 changed files with 21 additions and 24 deletions

View File

@@ -351,8 +351,8 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
q = (
select(Reaction, Author, Shout)
.join(Author, Reaction.created_by == int(Author.id))
.join(Shout, Reaction.shout == int(Shout.id))
.join(Author, Reaction.created_by == Author.id)
.join(Shout, Reaction.shout == Shout.id)
)
# calculate counters
@@ -430,7 +430,7 @@ async def reacted_shouts_updates(follower_id: int, limit=50, offset=0) -> List[S
# Shouts where follower reacted
q2 = (
select(Shout)
.join(Reaction, Reaction.shout_id == int(Shout.id))
.join(Reaction, Reaction.shout_id == Shout.id)
.options(joinedload(Shout.reactions), joinedload(Shout.authors))
.filter(Reaction.created_by == follower_id)
.group_by(Shout.id)