From 2f493336adf73df6aa344c33732532d90e6e2719 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 15 Apr 2021 16:24:05 -0700 Subject: [PATCH] Don't try to delete nonexistant objects --- bookwyrm/activitypub/verbs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/activitypub/verbs.py b/bookwyrm/activitypub/verbs.py index f79afdca..23032a87 100644 --- a/bookwyrm/activitypub/verbs.py +++ b/bookwyrm/activitypub/verbs.py @@ -40,7 +40,9 @@ class Delete(Verb): def action(self): """ find and delete the activity object """ obj = self.object.to_model(save=False, allow_create=False) - obj.delete() + if obj: + obj.delete() + # if we can't find it, we don't need to delete it because we don't have it @dataclass(init=False)