diff --git a/bookwyrm/activitystreams.py b/bookwyrm/activitystreams.py index 71f9e42d7..42f99e209 100644 --- a/bookwyrm/activitystreams.py +++ b/bookwyrm/activitystreams.py @@ -112,7 +112,7 @@ class ActivityStream(RedisStore): trace.get_current_span().set_attribute("status_privacy", status.privacy) trace.get_current_span().set_attribute( "status_reply_parent_privacy", - status.reply_parent.privacy if status.reply_parent else None, + status.reply_parent.privacy if status.reply_parent else status.privacy, ) # direct messages don't appear in feeds, direct comments/reviews/etc do if status.privacy == "direct" and status.status_type == "Note": diff --git a/bookwyrm/suggested_users.py b/bookwyrm/suggested_users.py index d897feff7..3e9bef9c4 100644 --- a/bookwyrm/suggested_users.py +++ b/bookwyrm/suggested_users.py @@ -254,7 +254,8 @@ def rerank_suggestions_task(user_id): def rerank_user_task(user_id, update_only=False): """do the hard work in celery""" user = models.User.objects.get(id=user_id) - suggested_users.rerank_obj(user, update_only=update_only) + if user: + suggested_users.rerank_obj(user, update_only=update_only) @app.task(queue=SUGGESTED_USERS)