Skip to content
Snippets Groups Projects
Verified Commit f5a6a40d authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fix #787: federation issue due to missing error handling

parent 9bf1c0cd
No related branches found
No related tags found
No related merge requests found
......@@ -388,7 +388,7 @@ def recursive_getattr(obj, key, permissive=False):
def match_route(route, payload):
for key, value in route.items():
payload_value = recursive_getattr(payload, key)
payload_value = recursive_getattr(payload, key, permissive=True)
if payload_value != value:
return False
......
......@@ -91,6 +91,11 @@ def test_receive_skips_if_no_matching_route(factories, now, mocker):
assert models.Activity.objects.count() == 0
def test_match_route_ignore_payload_issues():
payload = {"object": "http://hello"}
assert activity.match_route({"object.type": "Test"}, payload) is False
@pytest.mark.parametrize(
"params, policy_kwargs, expected",
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment