joined-createdby-fix
This commit is contained in:
@@ -72,7 +72,7 @@ def apply_filters(q, filters, author_id=None):
|
||||
async def get_shout(_, _info, slug=None, shout_id=None):
|
||||
with local_session() as session:
|
||||
q = select(Shout).options(
|
||||
joinedload(Shout.created_by),
|
||||
# joinedload(Shout.created_by),
|
||||
joinedload(Shout.authors),
|
||||
joinedload(Shout.topics),
|
||||
)
|
||||
@@ -142,7 +142,7 @@ async def load_shouts_by(_, info, options):
|
||||
q = (
|
||||
select(Shout)
|
||||
.options(
|
||||
joinedload(Shout.created_by, Author.id == Shout.created_by),
|
||||
# joinedload(Shout.created_by, Author.id == Shout.created_by),
|
||||
joinedload(Shout.authors),
|
||||
joinedload(Shout.topics),
|
||||
)
|
||||
@@ -203,13 +203,13 @@ async def load_shouts_feed(_, info, options):
|
||||
q = (
|
||||
select(Shout)
|
||||
.options(
|
||||
joinedload(Shout.created_by, Author.id == Shout.created_by),
|
||||
# joinedload(Shout.created_by, Author.id == Shout.created_by),
|
||||
joinedload(Shout.authors),
|
||||
joinedload(Shout.topics),
|
||||
)
|
||||
.where(
|
||||
and_(
|
||||
Shout.published_at != None,
|
||||
Shout.published_at.is_not(None),
|
||||
Shout.deleted_at.is_(None),
|
||||
Shout.id.in_(subquery),
|
||||
)
|
||||
|
Reference in New Issue
Block a user