From e9dc63e296a926e9e510b780eb9742127898ca33 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 22 Apr 2021 09:25:12 -0700 Subject: [PATCH] Only remove objects that are known --- bookwyrm/activitypub/verbs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm/activitypub/verbs.py b/bookwyrm/activitypub/verbs.py index c2cbfea3..090beea5 100644 --- a/bookwyrm/activitypub/verbs.py +++ b/bookwyrm/activitypub/verbs.py @@ -176,7 +176,8 @@ class Remove(Add): def action(self): """ find and remove the activity object """ obj = self.object.to_model(save=False, allow_create=False) - obj.delete() + if obj: + obj.delete() @dataclass(init=False)