Bug #21979
closedNot possible to view/edit repository: undefined method 'product' for #
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
Updated by Jonathon Turel almost 7 years ago
- Related to Bug #21955: Improve repository sets api added
Updated by Jonathon Turel almost 7 years ago
I think this has been addressed by the related issue which I've just attached. Please pull down master and take a look :)
Updated by Bernhard Suttner almost 7 years ago
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'
Updated by Eric Helms almost 7 years ago
- Assignee set to Jonathon Turel
- Translation missing: en.field_release set to 284
Updated by Jonathon Turel almost 7 years ago
- Related to Bug #22017: updating a repo fails with "undefined method content" added
Updated by Jonathon Turel almost 7 years ago
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 :)
Updated by Brad Buckingham over 6 years ago
- Target version changed from 242 to 245
Updated by Jonathon Turel over 6 years ago
- 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!