Fixes #6786 - Handle error when no taxonomy params get sent
Basically, no organization params are getting sent as the bug reporter is notusing json and not using wrapped params. You can also test this by doing:
curl -X POST http://localhost:3000/api/v2/organizations
This change prevents the following error from getting raised:
Processing by Api::V2::OrganizationsController#create as JSON Parameters: {"description"=>"biz", "name"=>"foo", "label"=>"bar", "apiv"=>"v2"}Expire fragment views/tabs_and_title_records-1 (0.1ms)Authorized user admin(Admin User)undefined method `[]' for nil:NilClass (NoMethodError)/usr/share/foreman/app/controllers/concerns/api/v2/taxonomies_controller.rb:75:in `params_match_database'...
Fixes #6786 - Handle error when no taxonomy params get sent
Basically, no organization params are getting sent as the bug reporter is not
using json and not using wrapped params. You can also test this by doing:
curl -X POST http://localhost:3000/api/v2/organizations
This change prevents the following error from getting raised:
Processing by Api::V2::OrganizationsController#create as JSON
Parameters: {"description"=>"biz", "name"=>"foo", "label"=>"bar", "apiv"=>"v2"}
Expire fragment views/tabs_and_title_records-1 (0.1ms)
Authorized user admin(Admin User)
undefined method `[]' for nil:NilClass (NoMethodError)
/usr/share/foreman/app/controllers/concerns/api/v2/taxonomies_controller.rb:75:in `params_match_database'
...