Project

General

Profile

« Previous | Next » 

Revision ff1e9ffc

Added by Dominic Cleal over 6 years ago

Fixes #20950 - Use 'distinct' in AR finders

View differences:

app/models/hostgroup.rb
# overwrite method in taxonomix, since hostgroup has ancestry
def used_taxonomy_ids(type)
return [] if new_record? && parent_id.blank?
Host::Base.where(:hostgroup_id => self.path_ids).uniq.pluck(type).compact
Host::Base.where(:hostgroup_id => self.path_ids).distinct.pluck(type).compact
end
def password_base64_encrypted?

Also available in: Unified diff