This commit is contained in:
2023-11-30 16:07:30 +03:00
parent 5f0a8f3b10
commit f1ccef7919
2 changed files with 7 additions and 11 deletions

View File

@@ -140,10 +140,9 @@ async def load_shouts_by(_, info, options):
"""
q = (
select(Shout)
select(Shout, Author)
.options(
# joinedload(Shout.created_by, Author.id == Shout.created_by),
joinedload(Shout.authors),
joinedload(Shout.authors, Shout.authors.contains(Author.id)),
joinedload(Shout.topics),
)
.where(Shout.deleted_at.is_(None))