-
Bug
-
Resolution: Done-Errata
-
Major
-
6.9.0
-
None
Description of problem: After upgrade to satellite 6.9, I can see an error message in the production logs
2021-01-26T23:37:13 [I|app|22106c00] Backtrace for 'unknown class Trend, ignoring' error (NameError): uninitialized constant Trend
22106c00 | Did you mean? Thread
22106c00 | /usr/share/foreman/app/models/filter.rb:81:in `get_resource_class'
22106c00 | /usr/share/foreman/app/models/permission.rb:22:in `block in with_translations'
22106c00 | /usr/share/foreman/app/models/permission.rb:22:in `map'
22106c00 | /usr/share/foreman/app/models/permission.rb:22:in `with_translations'
22106c00 | /usr/share/foreman/app/models/permission.rb:18:in `resources_with_translations'
Version-Release number of selected component (if applicable): Satellite 6.9
How reproducible: Always
Steps to Reproduce:
1. After upgrade, Try to edit any report template and check logs
Additional info:
I can see permission related to trends is present in the DB. It should be deleted in the upgrade
irb(main):010:0> Permission.where('name LIKE ?', "%_trends")
=> #<ActiveRecord::Relation #<Permission id: 171, name: "view_trends", resource_type: "Trend", created_at: "2019-08-05 21:14:09", updated_at: "2019-08-05 21:14:09">, #<Permission id: 172, name: "create_trends", resource_type: "Trend", created_at: "2019-08-05 21:14:09", updated_at: "2019-08-05 21:14:09">, #<Permission id: 173, name: "edit_trends", resource_type: "Trend", created_at: "2019-08-05 21:14:09", updated_at: "2019-08-05 21:14:09">, #<Permission id: 174, name: "destroy_trends", resource_type: "Trend", created_at: "2019-08-05 21:14:09", updated_at: "2019-08-05 21:14:09">, #<Permission id: 175, name: "update_trends", resource_type: "Trend", created_at: "2019-08-05 21:14:09", updated_at: "2019-08-05 21:14:09">>