Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1102120 - Content_view_filters listing produce "undefined method `filter_ids' for nil:NilClass" when called with bad/no arguments
Summary: Content_view_filters listing produce "undefined method `filter_ids' for nil:N...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-28 14:20 UTC by Matej Kollar
Modified: 2019-09-26 13:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:27:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 5985 0 None None None 2016-04-22 16:47:10 UTC

Description Matej Kollar 2014-05-28 14:20:02 UTC
Description of problem: When listing :content_view_filters, but called with no/wrong
arguments, ISE(500) 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...

Comment 1 RHEL Program Management 2014-05-28 14:25:18 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Milan Zázrivec 2014-05-29 15:02:10 UTC
Redmine issue: http://projects.theforeman.org/issues/5985

Comment 4 Bryan Kearney 2014-07-24 16:02:18 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/5985 has been closed
-------------
Partha Aji
Applied in changeset commit:katello|55b29a489abbf1f430e04aad33a04bd87a394a1f.

Comment 6 jaudet 2014-09-02 18:50:01 UTC
This bug is targeted by GitHub PR #1271. [1] The test passes, indicating that this bug has been verified. I will mark this bug as being verified after the test code has been reviewed by another team member.

[1] https://github.com/omaciel/robottelo/pull/1271

Comment 7 Bryan Kearney 2014-09-11 12:27:57 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


Note You need to log in before you can comment on or make changes to this bug.