Skip to content

Commit

Permalink
fix(APIv2): RHINENG-14554 exclude remediation_available from searchab…
Browse files Browse the repository at this point in the history
…le attributes
  • Loading branch information
romanblanco authored and RoamingNoMaD committed Dec 19, 2024
1 parent 8b53099 commit 1008466
Show file tree
Hide file tree
Showing 3 changed files with 4,720 additions and 4,720 deletions.
2 changes: 1 addition & 1 deletion app/models/v2/rule_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class RuleResult < ApplicationRecord
}
end

searchable_by :remediation_available, %i[eq] do |_key, _op, val|
searchable_by :remediation_available, %i[eq], except_parents: %i[reports] do |_key, _op, val|
{
conditions: 'rule.remediation_available = ?',
parameter: [ActiveModel::Type::Boolean.new.cast(val)]
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/v2/rule_results_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
pagination_params_v2
ids_only_param
sort_params_v2(V2::RuleResult)
search_params_v2(V2::RuleResult)
search_params_v2(V2::RuleResult, except: %i[remediation_available])

parameter name: :test_result_id, in: :path, type: :string, required: true
parameter name: :report_id, in: :path, type: :string, required: true
Expand Down
Loading

0 comments on commit 1008466

Please sign in to comment.