Merge pull request #982 from bookwyrm-social/flower-errors

Flower errors
This commit is contained in:
Mouse Reeve 2021-04-22 09:50:08 -07:00 committed by GitHub
commit 7bad8ac354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

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

View file

@ -155,8 +155,8 @@ class ActivitypubMixins(TestCase):
recipients = ActivitypubMixin.get_recipients(mock_self)
self.assertEqual(len(recipients), 2)
self.assertEqual(recipients[0], another_remote_user.inbox)
self.assertEqual(recipients[1], self.remote_user.inbox)
self.assertTrue(another_remote_user.inbox in recipients)
self.assertTrue(self.remote_user.inbox in recipients)
def test_get_recipients_direct(self, _):
""" determines the recipients for a user's object broadcast """