mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-16 11:05:15 +00:00
Specify which column DISTINCT should apply to
This commit is contained in:
parent
464a0298c6
commit
321397a349
1 changed files with 2 additions and 2 deletions
|
@ -139,14 +139,14 @@ class ActivityStream(RedisStore):
|
||||||
| (
|
| (
|
||||||
Q(following=status.user) & Q(following=status.reply_parent.user)
|
Q(following=status.user) & Q(following=status.reply_parent.user)
|
||||||
) # if the user is following both authors
|
) # if the user is following both authors
|
||||||
).distinct()
|
)
|
||||||
|
|
||||||
# only visible to the poster's followers and tagged users
|
# only visible to the poster's followers and tagged users
|
||||||
elif status.privacy == "followers":
|
elif status.privacy == "followers":
|
||||||
audience = audience.filter(
|
audience = audience.filter(
|
||||||
Q(following=status.user) # if the user is following the author
|
Q(following=status.user) # if the user is following the author
|
||||||
)
|
)
|
||||||
return audience.distinct()
|
return audience.distinct("id")
|
||||||
|
|
||||||
@tracer.start_as_current_span("ActivityStream.get_audience")
|
@tracer.start_as_current_span("ActivityStream.get_audience")
|
||||||
def get_audience(self, status):
|
def get_audience(self, status):
|
||||||
|
|
Loading…
Reference in a new issue