Project

General

Profile

Actions

Refactor #6596

closed

'type' field in Katello::System incorrectly triggers STI for Host::Managed

Added by Joseph Magen over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Target version:
Branch:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

I'm not sure why self.abstract_class = true in Katello::Model is not disabling STI.

Actions #1

Updated by Joseph Magen over 9 years ago

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
Actions #2

Updated by Joseph Magen over 9 years ago

  • 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
Actions #3

Updated by Ohad Levy over 9 years ago

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!!

Actions #4

Updated by The Foreman Bot over 9 years ago

  • 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 ()
Actions #5

Updated by Joseph Magen over 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Eric Helms over 9 years ago

  • translation missing: en.field_release set to 13
Actions

Also available in: Atom PDF