diff --git a/lib/puppet/resource_api.rb b/lib/puppet/resource_api.rb index 9fe8591f..f8584455 100644 --- a/lib/puppet/resource_api.rb +++ b/lib/puppet/resource_api.rb @@ -252,7 +252,7 @@ def to_resource_shim(resource) def self.rsapi_provider_get(names = nil) # If the cache has been marked as having all instances, then just return the # full contents: - return rsapi_provider_get_cache.all if rsapi_provider_get_cache.cached_all? && names.nil? + return rsapi_provider_get_cache.all if rsapi_provider_get_cache.cached_all? fetched = if type_definition.feature?('simple_get_filter') my_provider.get(context, names) @@ -265,7 +265,7 @@ def self.rsapi_provider_get(names = nil) rsapi_provider_get_cache.add(build_title(type_definition, resource_hash), resource_hash) end - if names.nil? && !type_definition.feature?('simple_get_filter') + unless type_definition.feature?('simple_get_filter') # Mark the cache as having all possible instances: rsapi_provider_get_cache.cached_all end