Skip to content

Commit

Permalink
ContainerImage assoc. destroying
Browse files Browse the repository at this point in the history
ContainerImageRegistry only nullify dependency.
Fixes OpenShift specs
  • Loading branch information
slemrmartin committed Jul 3, 2018
1 parent e874281 commit 4fe3f2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/container_image_registry.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class ContainerImageRegistry < ApplicationRecord
belongs_to :ext_management_system, :foreign_key => "ems_id"
has_many :container_images, :dependent => :destroy # What about deleted registry but containers are still running
has_many :container_images, :dependent => :nullify
has_many :containers, :through => :container_images
has_many :container_services
has_many :container_groups, :through => :container_services
Expand Down
2 changes: 1 addition & 1 deletion app/models/manageiq/providers/container_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ContainerManager < BaseManager
has_many :container_quotas, -> { active }, :foreign_key => :ems_id
has_many :container_limits, :foreign_key => :ems_id, :dependent => :destroy
has_many :container_image_registries, :foreign_key => :ems_id, :dependent => :destroy
has_many :container_images, -> { active }, :foreign_key => :ems_id
has_many :container_images, -> { active }, :foreign_key => :ems_id, :dependent => :destroy
has_many :persistent_volumes, :as => :parent, :dependent => :destroy
has_many :persistent_volume_claims, :foreign_key => :ems_id, :dependent => :destroy
has_many :container_builds, :foreign_key => :ems_id, :dependent => :destroy
Expand Down

0 comments on commit 4fe3f2d

Please sign in to comment.