authors-stat-fix
This commit is contained in:
@@ -25,7 +25,7 @@ def add_topic_stat_columns(q):
|
|||||||
aliased_authors.author == Author.id,
|
aliased_authors.author == Author.id,
|
||||||
Topic.id.in_(select(ShoutTopic.topic).where(ShoutTopic.shout == aliased_shout.id))
|
Topic.id.in_(select(ShoutTopic.topic).where(ShoutTopic.shout == aliased_shout.id))
|
||||||
))
|
))
|
||||||
q = q.add_columns(func.count(distinct(aliased_authors.author_id)).label('authors_stat'))
|
q = q.add_columns(func.count(distinct(aliased_authors.author)).label('authors_stat'))
|
||||||
|
|
||||||
# followers
|
# followers
|
||||||
q = q.outerjoin(aliased_followers, aliased_followers.topic == Topic.id)
|
q = q.outerjoin(aliased_followers, aliased_followers.topic == Topic.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user