mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
trophies: Reduce number of trophies fetched in Trophy.by_award.
We usually only care about 1 trophy anyway (except on admin pages) so this is drastically wasteful.
This commit is contained in:
@@ -169,7 +169,7 @@ class Trophy(Relation(Account, Award)):
|
||||
def by_award_cache(cls, award_id):
|
||||
q = Trophy._query(Trophy.c._thing2_id == award_id,
|
||||
sort = desc('_date'))
|
||||
q._limit = 500
|
||||
q._limit = 50
|
||||
return [ t._id for t in q ]
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user