Project

General

Profile

Bug #31523

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

Added by John Mitsch 12 months ago. Updated 22 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
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

Blocks Katello - Tracker #29297: Content Publication WorkflowNew

Associated revisions

Revision 20798322 (diff)
Added by Samir Jha 22 days ago

Fixes #31523 - Autocomplete with inclusion_type on filters (#9770)

History

#1 Updated by John Mitsch 12 months ago

#2 Updated by Justin Sherrill 11 months ago

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

#3 Updated by John Mitsch 10 months ago

  • Target version changed from Katello 4.0.0 to Katello 4.1.0

#4 Updated by Samir Jha 7 months ago

  • Target version changed from Katello 4.1.0 to Katello 4.2.0

#5 Updated by Samir Jha 4 months ago

  • Target version changed from Katello 4.2.0 to Katello 4.3.0

#6 Updated by The Foreman Bot 25 days ago

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

#7 Updated by The Foreman Bot 22 days ago

  • Fixed in Releases Katello 4.4.0 added

#8 Updated by Samir Jha 22 days ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF