mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-02-21 21:36:18 +00:00
Merge pull request #982 from bookwyrm-social/flower-errors
Flower errors
This commit is contained in:
commit
7bad8ac354
2 changed files with 4 additions and 3 deletions
|
@ -176,7 +176,8 @@ class Remove(Add):
|
||||||
def action(self):
|
def action(self):
|
||||||
""" find and remove the activity object """
|
""" find and remove the activity object """
|
||||||
obj = self.object.to_model(save=False, allow_create=False)
|
obj = self.object.to_model(save=False, allow_create=False)
|
||||||
obj.delete()
|
if obj:
|
||||||
|
obj.delete()
|
||||||
|
|
||||||
|
|
||||||
@dataclass(init=False)
|
@dataclass(init=False)
|
||||||
|
|
|
@ -155,8 +155,8 @@ class ActivitypubMixins(TestCase):
|
||||||
|
|
||||||
recipients = ActivitypubMixin.get_recipients(mock_self)
|
recipients = ActivitypubMixin.get_recipients(mock_self)
|
||||||
self.assertEqual(len(recipients), 2)
|
self.assertEqual(len(recipients), 2)
|
||||||
self.assertEqual(recipients[0], another_remote_user.inbox)
|
self.assertTrue(another_remote_user.inbox in recipients)
|
||||||
self.assertEqual(recipients[1], self.remote_user.inbox)
|
self.assertTrue(self.remote_user.inbox in recipients)
|
||||||
|
|
||||||
def test_get_recipients_direct(self, _):
|
def test_get_recipients_direct(self, _):
|
||||||
""" determines the recipients for a user's object broadcast """
|
""" determines the recipients for a user's object broadcast """
|
||||||
|
|
Loading…
Reference in a new issue