From 80f01c9abeffb3c89cd344902e43288d2c593b87 Mon Sep 17 00:00:00 2001 From: Hanna Novikava Date: Tue, 15 Aug 2017 11:44:31 +0300 Subject: [PATCH] Fix for problem with miq_group (find_by_description) --- app/models/miq_group.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/miq_group.rb b/app/models/miq_group.rb index a40a475b1c3..b145e100d98 100644 --- a/app/models/miq_group.rb +++ b/app/models/miq_group.rb @@ -60,7 +60,8 @@ def self.seed ldap_to_filters = filter_map_file.exist? ? YAML.load_file(filter_map_file) : {} root_tenant = Tenant.root_tenant - groups = where(:group_type => SYSTEM_GROUP).includes(:entitlement).index_by(&:description) + groups = where(:group_type => SYSTEM_GROUP, :tenant_id => Tenant.root_tenant) + .includes(:entitlement).index_by(&:description) roles = MiqUserRole.where("name like 'EvmRole-%'").index_by(&:name) role_map.each_with_index do |(group_name, role_name), index|