Filtering - include_filters in group and watch settings should not duplicate (#2151 #1845)

pull/2153/head
dgtlmoon 11 months ago committed by GitHub
parent 3b16b19a94
commit c90b27823a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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", []),

Loading…
Cancel
Save