mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: remove uneeded distinct from relation
No need to call `.distinct` when a unique index already exists.
This commit is contained in:
@@ -119,7 +119,7 @@ class Theme < ActiveRecord::Base
|
||||
|
||||
def self.components_for(theme_id)
|
||||
get_set_cache "theme_components_for_#{theme_id}" do
|
||||
ChildTheme.where(parent_theme_id: theme_id).distinct.pluck(:child_theme_id)
|
||||
ChildTheme.where(parent_theme_id: theme_id).pluck(:child_theme_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user