From c90b27823ae0a40ae04d6e53beb7c7fb1cf49e0a Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Fri, 2 Feb 2024 09:30:01 +0100 Subject: [PATCH] Filtering - include_filters in group and watch settings should not duplicate (#2151 #1845) --- changedetectionio/processors/text_json_diff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/changedetectionio/processors/text_json_diff.py b/changedetectionio/processors/text_json_diff.py index 305cfe17..619a2856 100644 --- a/changedetectionio/processors/text_json_diff.py +++ b/changedetectionio/processors/text_json_diff.py @@ -116,7 +116,9 @@ class perform_site_check(difference_detection_processor): # and then use getattr https://docs.python.org/3/reference/datamodel.html#object.__getitem__ # https://realpython.com/inherit-python-dict/ instead of doing it procedurely include_filters_from_tags = self.datastore.get_tag_overrides_for_watch(uuid=uuid, attr='include_filters') - include_filters_rule = [*watch.get('include_filters', []), *include_filters_from_tags] + + # 1845 - remove duplicated filters in both group and watch include filter + include_filters_rule = list({*watch.get('include_filters', []), *include_filters_from_tags}) subtractive_selectors = [*self.datastore.get_tag_overrides_for_watch(uuid=uuid, attr='subtractive_selectors'), *watch.get("subtractive_selectors", []),