Bug #33213
closed[pulp3] CV with filter by id with empty rules fails with undefined method `start_date' for nil:NilClass
Description
"Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1981401 \n\n*Description of problem:*\n~~~\n2021-07-12T13:40:03 [I|bac|] Task {label: Actions::Katello::ContentView::Publish, id: d1191436-11dc-4359-b59c-3e56cfabd46c, execution_plan_id: 7f4e15a8-bcbb-48a5-be9a-8d27932b9086} state changed: running\n2021-07-12T13:40:03 [E|bac|] undefined method `start_date' for nil:NilClass (NoMethodError)\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/models/katello/content_view_erratum_filter.rb:96:in `errata_from'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/models/katello/content_view_erratum_filter.rb:36:in `content_unit_pulp_ids'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:268:in `block (2 levels) in add_filter_content'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:267:in `each'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:267:in `block in add_filter_content'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:265:in `each'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:265:in `add_filter_content'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:327:in `block in copy_content_from_mapping'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:319:in `each'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/services/katello/pulp3/repository/yum.rb:319:in `copy_content_from_mapping'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/lib/actions/pulp3/repository/multi_copy_content.rb:23:in `invoke_external_task'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/polling.rb:84:in `initiate_external_action'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/polling.rb:19:in `run'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.4.7/lib/dynflow/action/cancellable.rb:14:in `run'\n | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.29/app/lib/actions/pulp3/abstract_async_task.rb:10:in `run'\n~~~\n\n*Version-Release number of selected component (if applicable):*\n\n\n*How reproducible:*\n\n\n*Steps to Reproduce:*\n1. Create CV with a RedHat repo\n2. Add CV Errata Filter by ID\n3. Leave the ID list (and date and time also) empty\n4. Publish CV\n\n*Actual results:*\nFailure\n\n*Expected results:*\nSuccess\n\n*Additional info:*\nAnother bug is that the UI show in the next step and when editing later in the 'Add' Tab the Date/Time section which is incorrect because that shall be only for the 'Erratum by Date and Type'"