From 6437a5aeb7a97d51eb75250ac831edbc3faa86e3 Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Wed, 25 Jan 2023 22:36:02 -0500 Subject: [PATCH] Properly handle Author targeting blocks --- activities/models/post.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/activities/models/post.py b/activities/models/post.py index e9ec76c..e6a0e36 100644 --- a/activities/models/post.py +++ b/activities/models/post.py @@ -724,7 +724,10 @@ class Post(StatorModel): .select_related("target") ) async for block in blocks: - targets.remove(block.target) + try: + targets.remove(block.target) + except KeyError: + pass # Now dedupe the targets based on shared inboxes (we only keep one per # shared inbox) deduped_targets = set()