Fixes removing user from recs on follow

This commit is contained in:
Mouse Reeve 2021-08-04 09:49:05 -07:00
parent 89acfa4f3e
commit 6db6aa6cb1

View file

@ -141,7 +141,7 @@ def update_suggestions_on_follow(sender, instance, created, *args, **kwargs):
if instance.user_subject.local: if instance.user_subject.local:
remove_suggestion_task.delay(instance.user_subject.id, instance.user_object.id) remove_suggestion_task.delay(instance.user_subject.id, instance.user_object.id)
rerank_user_task.delay(instance.user_object.id) rerank_user_task.delay(instance.user_object.id, update_only=False)
@receiver(signals.post_save, sender=models.UserBlocks) @receiver(signals.post_save, sender=models.UserBlocks)
@ -159,7 +159,7 @@ def update_suggestions_on_block(sender, instance, *args, **kwargs):
def update_suggestions_on_unfollow(sender, instance, **kwargs): def update_suggestions_on_unfollow(sender, instance, **kwargs):
"""update rankings, but don't re-suggest because it was probably intentional""" """update rankings, but don't re-suggest because it was probably intentional"""
if instance.user_object.discoverable: if instance.user_object.discoverable:
rerank_user_task.delay(instance.user_object.id) rerank_user_task.delay(instance.user_object.id, update_only=False)
@receiver(signals.post_save, sender=models.ShelfBook) @receiver(signals.post_save, sender=models.ShelfBook)