Refactor #6596
closed
'type' field in Katello::System incorrectly triggers STI for Host::Managed
Added by Joseph Magen over 10 years ago.
Updated over 6 years ago.
Description
I'm not sure why self.abstract_class = true in Katello::Model is not disabling STI.
if the type of Katello::System instance is 'Host', then when working the rails console, the class type returns Host::Managed
a = Katello::System.first
a.class
=> Host::Managed
- Subject changed from refactor 'type' field in Katello::System that incorrect triggers STI to 'type' field in Katello::System incorrectly triggers STI for Host::Managed
the main concern here, is that once you initialize a katello::system object, from rails, its actually a host::managed object.
if you perform any action on it (like changing an environment_id) it would change the host table and not the katello systems table!!
- Status changed from New to Ready For Testing
- Target version changed from 56 to 49
- Pull request https://github.com/Katello/katello/pull/4421 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 13
Also available in: Atom
PDF