diff --git a/app/services/affinity_groups_hierarchy.rb b/app/services/affinity_groups_hierarchy.rb index 5ac8e5b..979f320 100644 --- a/app/services/affinity_groups_hierarchy.rb +++ b/app/services/affinity_groups_hierarchy.rb @@ -59,7 +59,7 @@ class AffinityGroupsHierarchy < Array private def load_discomforts - @load_discomforts ||= GroupAffinity.pluck(:group_a_id, :group_b_id, + @discomforts ||= GroupAffinity.pluck(:group_a_id, :group_b_id, :discomfort).each_with_object({}) do |(id_a, id_b, discomfort), acc| acc[uuid_to_int(id_a) + uuid_to_int(id_b)] = discomfort end