mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 17:28:07 +08:00
DEV: Remove useless ORDER clause (#12247)
These results are combined with others and then ordered in Ruby.
This commit is contained in:
@ -142,7 +142,6 @@ class UserSummary
|
||||
.merge(Topic.listable_topics.visible.secured(@guardian))
|
||||
.where(user: @user)
|
||||
.group('topics.category_id')
|
||||
.order('COUNT(*) DESC')
|
||||
|
||||
top_categories = {}
|
||||
|
||||
@ -168,7 +167,6 @@ class UserSummary
|
||||
.where('topics.category_id in (?)', top_categories.keys)
|
||||
.where(user: @user)
|
||||
.group('topics.category_id')
|
||||
.order('COUNT(*) DESC')
|
||||
.pluck('category_id, COUNT(*)')
|
||||
.each do |r|
|
||||
top_categories[r[0].to_i].topic_count = r[1]
|
||||
|
Reference in New Issue
Block a user