From 59fcc62528058091df7290b13f7d35f10a40f051 Mon Sep 17 00:00:00 2001 From: Tomer Brisker Date: Sun, 29 Nov 2020 18:22:53 +0200 Subject: [PATCH] Fixes #31364 - Properly import facts when unattended == false The fact importer calls host.without_orchestration which is defined in orchestration concern, however the concern is only included when unattended == true. Users who have the setting set to false will not be able to import facts as the fact importer will fail to find this method. (cherry picked from commit 208313190271a66f4f7a4df5fb2b584774a370c7) --- app/models/host/managed.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/host/managed.rb b/app/models/host/managed.rb index a2e88d828ef..6b10fc5722b 100644 --- a/app/models/host/managed.rb +++ b/app/models/host/managed.rb @@ -338,6 +338,10 @@ def compute? def compute_provides?(attr) false end + + def without_orchestration + yield + end end before_validation :set_hostgroup_defaults, :set_ip_address