Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence editor: Remove checks on save as not required anymore #1988

Merged
merged 1 commit into from
Jul 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default {

predefinedStrategies: ['everyChange', 'everyUpdate', 'restoreOnStartup'],
// Filter configuration is completely based on these definitions, when adding new filters, no code needs to be updated.
// However, please note that some validation and checks are in place for some filter types in save(), editFilter(), saveFilter() and filter-popup.vue
// However, please note that some validation and checks are in place for some filter types in editFilter(), saveFilter() and filter-popup.vue
filterTypes: [
{
name: 'thresholdFilters',
Expand Down Expand Up @@ -470,17 +470,6 @@ export default {
if (!this.isEditable) return
if (this.currentTab === 'code') this.fromYaml()

// Ensure relative is set on threshold filter, otherwise the save request fails with a 500
this.persistence.thresholdFilters.forEach((f) => {
if (f.relative === undefined) f.relative = false
})
// Ensure inverted is set for equals and include filter, otherwise the save request fails with a 500
this.persistence.equalsFilters.forEach((f) => {
if (f.inverted === undefined) f.inverted = false
})
this.persistence.includeFilters.forEach((f) => {
if (f.inverted === undefined) f.inverted = false
})
// Update the code tab
if (this.persistenceYaml) this.toYaml()

Expand Down