thp / urlwatch

Watch (parts of) webpages and get notified when something changes via e-mail, on your phone or via other means. Highly configurable.
https://thp.io/2008/urlwatch/
Other
2.81k stars 352 forks source link

Avoids deleting 'method' key from shared subfilter #726

Closed trevorshannon closed 1 year ago

trevorshannon commented 1 year ago

Fixes #588

Deleting the 'method' key from a subfilter works when each job has its own subfilter dict. However, when the subfilter comes from job defaults, every job uses the same subfilter dict. Thus, the dict should not be modified so as to preserve it for use by other jobs.

This also adds a test for the specific behavior described in #588. The test has been verified as failing prior to this change. A more generic test that checks no filters modify the subfilter dict would perhaps be better though not included in this PR.