Skip to content

Commit

Permalink
patch - fixing bug in dashboard's filters validation (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
OrNovo authored Oct 16, 2023
1 parent 50604bd commit a52bd60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coralogix/resource_coralogix_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -2003,8 +2003,8 @@ func (f filterOperatorValidator) ValidateObject(ctx context.Context, req validat

var filter FilterOperatorModel
req.ConfigValue.As(ctx, &filter, basetypes.ObjectAsOptions{})
if filter.Type.ValueString() == "equals" && filter.SelectedValues.IsNull() {
resp.Diagnostics.Append(diag.NewErrorDiagnostic("filter operator validation failed", "when type is `equals`, `selected_values` must be set"))
if filter.Type.ValueString() == "not_equals" && filter.SelectedValues.IsNull() {
resp.Diagnostics.Append(diag.NewErrorDiagnostic("filter operator validation failed", "when type is `not_equals`, `selected_values` must be set"))
}
}

Expand Down

0 comments on commit a52bd60

Please sign in to comment.