Don't reutnr an error when discarding activity objects

This commit is contained in:
Mouse Reeve 2021-04-08 20:03:29 -07:00
parent 37aacee9c6
commit af6cab2e3f
2 changed files with 4 additions and 1 deletions

View file

@ -111,7 +111,7 @@ class ActivityObject:
and hasattr(model, "ignore_activity") and hasattr(model, "ignore_activity")
and model.ignore_activity(self) and model.ignore_activity(self)
): ):
raise ActivitySerializerError() return None
# check for an existing instance # check for an existing instance
instance = instance or model.find_existing(self.serialize()) instance = instance or model.find_existing(self.serialize())

View file

@ -136,6 +136,9 @@ class InboxActivities(TestCase):
"id": "http://www.faraway.com/boost/12", "id": "http://www.faraway.com/boost/12",
"actor": self.remote_user.remote_id, "actor": self.remote_user.remote_id,
"object": status.remote_id, "object": status.remote_id,
"to": ["https://www.w3.org/ns/activitystreams#public"],
"cc": ["https://example.com/user/mouse/followers"],
"published": "Mon, 25 May 2020 19:31:20 GMT",
} }
responses.add( responses.add(
responses.GET, status.remote_id, json=status.to_activity(), status=200 responses.GET, status.remote_id, json=status.to_activity(), status=200