Fixes wildly high similiarity metrics in directory
This commit is contained in:
parent
ef057dd573
commit
c42719ee1e
2 changed files with 48 additions and 0 deletions
|
@ -205,6 +205,7 @@ def get_suggested_users(user, *args, **kwargs):
|
|||
~Q(id__in=user.following.all()),
|
||||
following__in=user.following.all(),
|
||||
),
|
||||
distinct=True
|
||||
),
|
||||
shared_books=Count(
|
||||
"shelfbook",
|
||||
|
@ -214,6 +215,7 @@ def get_suggested_users(user, *args, **kwargs):
|
|||
s.book.parent_work for s in user.shelfbook_set.all()
|
||||
],
|
||||
),
|
||||
distinct=True
|
||||
),
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue