From 694f3040374e813cd5914919c08a8e54f431fae3 Mon Sep 17 00:00:00 2001 From: skovic Date: Thu, 9 Aug 2018 17:06:51 -0400 Subject: [PATCH] Fix for physical server alert bug --- app/models/physical_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/physical_server.rb b/app/models/physical_server.rb index 17edc56683d..4476f889a22 100644 --- a/app/models/physical_server.rb +++ b/app/models/physical_server.rb @@ -27,7 +27,7 @@ class PhysicalServer < ApplicationRecord has_one :host, :inverse_of => :physical_server has_one :asset_detail, :as => :resource, :dependent => :destroy has_many :guest_devices, :through => :hardware - has_many :miq_alert_statuses, :as => :resource, :dependent => :destroy, :inverse_of => :physical_server + has_many :miq_alert_statuses, :as => :resource, :dependent => :destroy, :inverse_of => :resource scope :with_hosts, -> { where("physical_servers.id in (select hosts.physical_server_id from hosts)") }