From 90da9fa8124dcfef7ffe6473b7571f82f4ff34e8 Mon Sep 17 00:00:00 2001 From: Fabien Dupont Date: Mon, 15 Oct 2018 15:13:02 -0400 Subject: [PATCH] Add allow_nil to delegate --- app/models/conversion_host.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/conversion_host.rb b/app/models/conversion_host.rb index eb2ac709a1b..1c1cb4fdd88 100644 --- a/app/models/conversion_host.rb +++ b/app/models/conversion_host.rb @@ -6,7 +6,7 @@ class ConversionHost < ApplicationRecord belongs_to :resource, :polymorphic => true has_many :service_template_transformation_plan_tasks, :dependent => :nullify has_many :active_tasks, -> { where(:state => 'active') }, :class_name => ServiceTemplateTransformationPlanTask, :inverse_of => :conversion_host - delegate :ext_management_system, :to => :resource + delegate :ext_management_system, :to => :resource, :allow_nil => true # To be eligible, a conversion host must have the following properties # - A transport mechanism is configured for source (set by 3rd party)