Project

General

Profile

Actions

Bug #5985

closed

content_view_filters listing produce "undefined method `filter_ids' for nil:NilClass" when called with no arguments

Added by Milan Zázrivec almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1102120

Description of problem: When listing :content_view_filters, but called with no/wrong
arguments, ISE is generated instead of proper error message.

How reproducible: always/deterministic

Steps to Reproduce:
1. create content-view
2. create filter
3.
bundle exec irb
require 'apipie-bindings'
api = ApipieBindings::API.new({:uri....
api.resource(:content_view_filters).call(:index, {})

Actual results:

production.log:

Processing by Apipie::ApipiesController#apipie_checksum as JSON
Parameters: {"apipy"=>{}}
Rendered /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.1.2/app/views/apipie/apipies/apipie_checksum.json.erb (0.2ms)
Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
Processing by Katello::Api::V2::ContentViewFiltersController#index as application/json;version=2
Parameters: {"api_version"=>"v2", "content_view_filter"=>{}}
Expire fragment views/tabs_and_title_records-1 (0.1ms)
Authorized user admin(Admin User)
NoMethodError: undefined method `filter_ids' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/controllers/katello/api/v2/content_view_filters_controller.rb:28:in `index'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:560:in `block (3 levels) in run_937089204135300545__process_action__1511122125132080161__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_9888'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_2792'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_9888'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:471:in `block (2 levels) in _run
_937089204135300545__process_action__1511122125132080161__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_9887'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_9887'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:415:in `block in _run
_937089204135300545__process_action__1511122125132080161__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_9886'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_9886'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run
_937089204135300545__process_action__1511122125132080161__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'

...

Expected results:

Message about required parameters or something like that.

Actions #1

Updated by Eric Helms almost 10 years ago

  • Target version set to 45
  • Triaged changed from No to Yes
Actions #2

Updated by Eric Helms almost 10 years ago

  • Target version changed from 45 to 48
Actions #3

Updated by Eric Helms almost 10 years ago

  • Target version changed from 48 to 49
Actions #4

Updated by The Foreman Bot almost 10 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/4473 added
Actions #5

Updated by Partha Aji almost 10 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF