Don't try to delete nonexistant objects

This commit is contained in:
Mouse Reeve 2021-04-15 16:24:05 -07:00
parent addcc59d7f
commit 2f493336ad

View file

@ -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)