зеркало из https://github.com/github/octofacts.git
Fix nodes accessor
This commit is contained in:
Родитель
b545c53a15
Коммит
6162cc97a0
|
@ -45,7 +45,7 @@ module Octofacts
|
|||
add_fact_to_index(key) unless indexed_fact?(key)
|
||||
matching_nodes = index[key][value.to_s]
|
||||
raise Octofacts::Errors::NoFactsError if matching_nodes.nil?
|
||||
self.nodes = nodes & matching_nodes
|
||||
@nodes = nodes & matching_nodes
|
||||
end
|
||||
|
||||
self
|
||||
|
@ -62,7 +62,7 @@ module Octofacts
|
|||
end
|
||||
end
|
||||
|
||||
self.nodes = matching_nodes
|
||||
@nodes = matching_nodes
|
||||
self
|
||||
end
|
||||
|
||||
|
@ -72,7 +72,7 @@ module Octofacts
|
|||
add_fact_to_index(key) unless indexed_fact?(key)
|
||||
matching_nodes = index[key][value.to_s]
|
||||
unless matching_nodes.nil?
|
||||
self.nodes = (matching_nodes.to_set + nodes.to_set).to_a
|
||||
@nodes = (matching_nodes.to_set + nodes.to_set).to_a
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче