Project

General

Profile

Actions

Bug #31523

closed

Searching for content view filter with just "inclusion_type" will return ISE

Added by John Mitsch over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

This was seen because of the autocomplete search, to reproduce you can send something like:

curl -g -k -u admin:changeme -H "Content-Type: application/json" localhost:3000/katello/api/v2/content_view_filters?content_view_id=5&per_page=20&page=1&search=inclusion_type

Error:
2020-12-16T19:01:21 [I|app|94643dc4] Started GET "/katello/api/v2/content_view_filters?content_view_id=5&per_page=20&page=1&search=inclusion_type" for ::1 at 2020-12-16 19:01:21 +0000
2020-12-16T19:01:21 [I|app|94643dc4] Processing by Katello::Api::V2::ContentViewFiltersController#index as JSON
2020-12-16T19:01:21 [I|app|94643dc4] Parameters: {"content_view_id"=>"5", "per_page"=>"20", "page"=>"1", "search"=>"inclusion_type", "api_version"=>"v2"}
2020-12-16T19:01:21 [E|app|94643dc4] ActiveRecord::PreparedStatementInvalid: wrong number of bind variables (0 for 1) in: (["(\"katello_content_view_filters\".\"inclusion\" <> ?)", false])
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/sanitization.rb:209:in `raise_if_bind_arity_mismatch'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/sanitization.rb:166:in `replace_bind_variables'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/sanitization.rb:129:in `sanitize_sql_array'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/sanitization.rb:26:in `sanitize_sql_for_conditions'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/relation/where_clause_factory.rb:14:in `build'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/relation/query_methods.rb:656:in `where!'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/activerecord-6.0.3.4/lib/active_record/relation/query_methods.rb:649:in `where'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/scoped_search-4.1.9/lib/scoped_search/definition.rb:329:in `block in register_named_scope!'
94643dc4 | /home/vagrant/katello/app/controllers/katello/api/v2/api_controller.rb:81:in `scoped_search'
94643dc4 | /home/vagrant/katello/app/controllers/katello/api/v2/content_view_filters_controller.rb:18:in `index'
94643dc4 | /home/vagrant/foreman/.vendor/ruby/2.5.0/gems/actionpack-6.0.3.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'


Related issues 1 (1 open0 closed)

Blocks Katello - Tracker #29297: Content Publication WorkflowNew

Actions
Actions #1

Updated by John Mitsch over 3 years ago

Actions #2

Updated by Justin Sherrill over 3 years ago

  • Category set to Content Views
  • Target version changed from Katello 4.1.0 to Katello 4.0.0
  • Triaged changed from No to Yes
Actions #3

Updated by John Mitsch about 3 years ago

  • Target version changed from Katello 4.0.0 to Katello 4.1.0
Actions #4

Updated by Samir Jha almost 3 years ago

  • Target version changed from Katello 4.1.0 to Katello 4.2.0
Actions #5

Updated by Samir Jha over 2 years ago

  • Target version changed from Katello 4.2.0 to Katello 4.3.0
Actions #6

Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Samir Jha
  • Pull request https://github.com/Katello/katello/pull/9770 added
Actions #7

Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases Katello 4.4.0 added
Actions #8

Updated by Samir Jha over 2 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF