From 4cdcf40a2becec716662d403366fa0179d8192f0 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Wed, 1 Apr 2020 17:47:07 -0400 Subject: [PATCH] fix storage profile ems foreign key got the error that there is no ext_management_system_id which is valid. All other belongs_to :ext_management_system declarations also include the foreign key This caused an error when assigning an ems to a storage profile --- app/models/storage_profile.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/storage_profile.rb b/app/models/storage_profile.rb index 5c7be1c20a3..a3f403d51fc 100644 --- a/app/models/storage_profile.rb +++ b/app/models/storage_profile.rb @@ -1,5 +1,5 @@ class StorageProfile < ApplicationRecord - belongs_to :ext_management_system + belongs_to :ext_management_system, :foreign_key => :ems_id has_many :storage_profile_storages, :dependent => :destroy has_many :storages, :through => :storage_profile_storages has_many :vms_and_templates, :dependent => :nullify