diff --git a/changedetectionio/processors/text_json_diff/processor.py b/changedetectionio/processors/text_json_diff/processor.py index c9baa6a5f..1ea15063a 100644 --- a/changedetectionio/processors/text_json_diff/processor.py +++ b/changedetectionio/processors/text_json_diff/processor.py @@ -324,13 +324,13 @@ class ContentProcessor: append_pretty_line_formatting=not self.watch.is_source_type_url ) - # Raise error if filter returned nothing - if not filtered_content.strip(): - raise FilterNotFoundInResponse( - msg=self.filter_config.include_filters, - screenshot=self.fetcher.screenshot, - xpath_data=self.fetcher.xpath_data - ) + # Raise error if filter returned nothing + if not filtered_content.strip(): + raise FilterNotFoundInResponse( + msg=self.filter_config.include_filters, + screenshot=self.fetcher.screenshot, + xpath_data=self.fetcher.xpath_data + ) return filtered_content diff --git a/changedetectionio/tests/test_filter_exist_changes.py b/changedetectionio/tests/test_filter_exist_changes.py index eb2019759..caa2f5633 100644 --- a/changedetectionio/tests/test_filter_exist_changes.py +++ b/changedetectionio/tests/test_filter_exist_changes.py @@ -93,7 +93,9 @@ def test_filter_doesnt_exist_then_exists_should_get_notification(client, live_se "tags": "my tag", "title": "my title", "headers": "", - "include_filters": '.ticket-available', + # preprended with extra filter that intentionally doesn't match any entry, + # notification should still be sent even if first filter does not match (PR#3516) + "include_filters": ".non-matching-selector\n.ticket-available", "fetch_backend": "html_requests", "time_between_check_use_default": "y"})