From be0544a3727c04b7b6ee6cf7f242eea4334e80a8 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Fri, 14 Jun 2024 16:42:32 +0800 Subject: [PATCH] cannot use current_user in celery task --- app/topic/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/topic/routes.py b/app/topic/routes.py index 7dcfaa1f..b0f00c76 100644 --- a/app/topic/routes.py +++ b/app/topic/routes.py @@ -273,7 +273,7 @@ def send_community_follow(community_id, join_request_id, user_id): user = User.query.get(user_id) community = Community.query.get(community_id) follow = { - "actor": current_user.public_url(), + "actor": user.public_url(), "to": [community.public_url()], "object": community.public_url(), "type": "Follow",