From 99e7fb8639f64e1d5577bcfc4a76620e9f37e1b7 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 12 Nov 2023 16:30:49 -0700 Subject: [PATCH] Fix prune issues when multiple replies --- activities/management/commands/pruneposts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activities/management/commands/pruneposts.py b/activities/management/commands/pruneposts.py index 0a1845c..8e0489f 100644 --- a/activities/management/commands/pruneposts.py +++ b/activities/management/commands/pruneposts.py @@ -37,7 +37,7 @@ class Command(BaseCommand): in_reply_to__in=post_ids_and_uris.keys() ).values_list("in_reply_to", flat=True) for reply in replies: - if reply: + if reply and reply in post_ids_and_uris: del post_ids_and_uris[reply] # Delete them