From 148183f530f3036ae692c2a64941bfac8c883524 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:35:28 +1200 Subject: [PATCH] to be sure --- app/activitypub/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index 44165bd6..3a06bc35 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -727,7 +727,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): old_cross_posts = Post.query.filter(Post.id.in_(post.cross_posts)).all() post.cross_posts.clear() for ocp in old_cross_posts: - if ocp.cross_posts is not None: + if ocp.cross_posts is not None and post.id in ocp.cross_posts: ocp.cross_posts.remove(post.id) delete_post_or_comment(user_ap_id, community_ap_id, to_be_deleted_ap_id) activity_log.result = 'success'