mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 11:13:22 +08:00
DEV: remove uneeded distinct from relation
No need to call `.distinct` when a unique index already exists.
This commit is contained in:
parent
fca727fd92
commit
5cef71e885
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user