mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Remove useless ORDER clause (#12247)
These results are combined with others and then ordered in Ruby.
This commit is contained in:
parent
6b4d066834
commit
6f0397fba0
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user