From 42699a8d252f08883a5c7ebc46dd9ea5dc27c46b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 22 May 2021 12:20:23 -0700 Subject: [PATCH] Update your own suggestions on shelve --- bookwyrm/suggested_users.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bookwyrm/suggested_users.py b/bookwyrm/suggested_users.py index ae60a769..3136803d 100644 --- a/bookwyrm/suggested_users.py +++ b/bookwyrm/suggested_users.py @@ -137,6 +137,11 @@ def update_suggestions_on_follow(sender, instance, created, *args, **kwargs): # pylint: disable=unused-argument def update_rank_on_shelving(sender, instance, *args, **kwargs): """when a user shelves or unshelves a book, re-compute their rank""" + # if it's a local user, re-calculate who is rec'ed to them + if instance.user.local: + suggested_users.rerank_user_suggestions(instance.user) + + # if the user is discoverable, update their rankings if not instance.user.discoverable: return suggested_users.rerank_obj(instance.user)