Bug #21979
closed
Not possible to view/edit repository: undefined method 'product' for #
Added by Bernhard Suttner about 7 years ago.
Updated over 6 years ago.
Description
The following issue occurs while using: http://[ip]:3000/katello/api/v2/products/7 (VERIFY_URL)
{"displayMessage":"undefined method `product' for #\u003cKatello::Content:0x00000010b74098\u003e","errors":["undefined method `product' for #\u003cKatello::Content:0x00000010b74098\u003e"]}
Steps to reproduce:
- Add a new product (only enter the name)
- Verify that the product exists with VERIFY_URL
- Add a repository to this product (only enter the name and set the type to yum)
=> Broken
NoMethodError: undefined method `product' for #<Katello::Content:0x007fc958087018>
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:in `method_missing'
| /home/vagrant/katello/app/models/katello/glue/candlepin/product_content.rb:10:in `modified_product_ids'
| /home/vagrant/katello/app/views/katello/api/v2/products/_product_content.json.rabl:12:in `block in eval_source'
- Verify that the product exists with VERIFY_URL => broken
- Related to Bug #21955: Improve repository sets api added
I think this has been addressed by the related issue which I've just attached. Please pull down master and take a look :)
Better than before. Thank you very much.
I still get this issues while updating a already existing repository:
An error occurred saving the Repository: undefined method `content' for #
2017-12-15T13:23:11 74d93d01 [app] [E] NoMethodError: undefined method `content' for #<Katello::Repository:0x007f9d224b3090>
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:in `method_missing'
| /home/vagrant/katello.local/app/lib/actions/katello/repository/update.rb:18:in `plan'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/action.rb:473:in `block (3 levels) in execute_plan'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `call'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `pass'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware.rb:18:in `pass'
- Assignee set to Jonathon Turel
- Translation missing: en.field_release set to 284
- Target version set to 242
- Related to Bug #22017: updating a repo fails with "undefined method content" added
Bernhard Suttner wrote:
Better than before. Thank you very much.
I still get this issues while updating a already existing repository:
An error occurred saving the Repository: undefined method `content' for #
2017-12-15T13:23:11 74d93d01 [app] [E] NoMethodError: undefined method `content' for #<Katello::Repository:0x007f9d224b3090>
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activemodel-4.2.9/lib/active_model/attribute_methods.rb:433:in `method_missing'
| /home/vagrant/katello.local/app/lib/actions/katello/repository/update.rb:18:in `plan'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/action.rb:473:in `block (3 levels) in execute_plan'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `call'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware/stack.rb:26:in `pass'
| /home/vagrant/.rvm/gems/ruby-2.2.4/gems/dynflow-0.8.32/lib/dynflow/middleware.rb:18:in `pass'
Ah! Sorry for the delay. This also appears to have been fixed over the recent holiday by the second issue I have just attached here. Please take another look :)
- Target version changed from 242 to 245
- Status changed from New to Closed
This issue has been addressed by the two associated bugs, so I am going to close this one out. Thank you for the report!
Also available in: Atom
PDF