diff options
| author | 2022-10-08 15:45:39 +0300 | |
|---|---|---|
| committer | 2022-10-08 15:45:39 +0300 | |
| commit | ed7fd34b200ef4267f3735e770ac4b0d9b037559 (patch) | |
| tree | 4527dca8ad6bbe71d243db70310d08e6ba865891 /tests | |
| parent | Fix pings validation (diff) | |
Ignore overrides that are equal to their defaults
If an override is added that is equal to the default, it is ignored instead.
If an override is read from a Filter object that is equal to its default, it is ignored instead.
This is done because otherwise when a setting shares an entry with an overriden setting (e.g infraction_type with infraction_duration),
there's no way of knowing whether it was truly overridden, since None values are not preserved for filters on loading (that is because the same pydantic models are used for both the filter and filter-list settings).
This seems like an acceptable trade-off since overrides which are equal to their defaults don't have a practical use.
Addiotionally, this commit fixes not being able to set an empty string as an override to a non-empty default.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions