only published in random topic shouts (#114)

This commit is contained in:
Igor Lobanov 2023-12-21 11:49:28 +01:00 committed by GitHub
parent f395832d32
commit 67576d0a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -273,7 +273,9 @@ async def load_random_topic_shouts(_, info, limit):
joinedload(Shout.topics), joinedload(Shout.topics),
) )
.join(ShoutTopic, and_(Shout.id == ShoutTopic.shout, ShoutTopic.topic == topic.id)) .join(ShoutTopic, and_(Shout.id == ShoutTopic.shout, ShoutTopic.topic == topic.id))
.where(and_(Shout.deletedAt.is_(None), Shout.layout.is_not(None))) .where(
and_(Shout.deletedAt.is_(None), Shout.layout.is_not(None), Shout.visibility == "public")
)
) )
q = add_stat_columns(q) q = add_stat_columns(q)