mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Always pass stores to remove_object_from_related_stores
This commit is contained in:
parent
93bd66ad3e
commit
8053f49acc
2 changed files with 9 additions and 3 deletions
|
@ -516,7 +516,9 @@ def remove_status_task(status_ids):
|
||||||
|
|
||||||
for stream in streams.values():
|
for stream in streams.values():
|
||||||
for status in statuses:
|
for status in statuses:
|
||||||
stream.remove_object_from_related_stores(status)
|
stream.remove_object_from_related_stores(
|
||||||
|
status, stores=stream.get_stores_for_object(status)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.task(queue=HIGH, ignore_result=True)
|
@app.task(queue=HIGH, ignore_result=True)
|
||||||
|
|
|
@ -254,7 +254,9 @@ def rerank_user_task(user_id, update_only=False):
|
||||||
def remove_user_task(user_id):
|
def remove_user_task(user_id):
|
||||||
"""do the hard work in celery"""
|
"""do the hard work in celery"""
|
||||||
user = models.User.objects.get(id=user_id)
|
user = models.User.objects.get(id=user_id)
|
||||||
suggested_users.remove_object_from_related_stores(user)
|
suggested_users.remove_object_from_related_stores(
|
||||||
|
user, stores=suggested_users.get_stores_for_object(user)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.task(queue=MEDIUM, ignore_result=True)
|
@app.task(queue=MEDIUM, ignore_result=True)
|
||||||
|
@ -268,7 +270,9 @@ def remove_suggestion_task(user_id, suggested_user_id):
|
||||||
def bulk_remove_instance_task(instance_id):
|
def bulk_remove_instance_task(instance_id):
|
||||||
"""remove a bunch of users from recs"""
|
"""remove a bunch of users from recs"""
|
||||||
for user in models.User.objects.filter(federated_server__id=instance_id):
|
for user in models.User.objects.filter(federated_server__id=instance_id):
|
||||||
suggested_users.remove_object_from_related_stores(user)
|
suggested_users.remove_object_from_related_stores(
|
||||||
|
user, stores=suggested_users.get_stores_for_object(user)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.task(queue=LOW, ignore_result=True)
|
@app.task(queue=LOW, ignore_result=True)
|
||||||
|
|
Loading…
Reference in a new issue