mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Set attributes on Wrapped search result
This commit is contained in:
@@ -1294,13 +1294,14 @@ class FrontController(RedditController):
|
||||
|
||||
def _search_builder_wrapper(self, q):
|
||||
query = q.query
|
||||
recent = q.recent
|
||||
recent = str(q.recent) if q.recent else None
|
||||
sort = q.sort
|
||||
def wrapper_fn(thing):
|
||||
thing.prev_search = query
|
||||
thing.recent = recent
|
||||
thing.sort = sort
|
||||
w = Wrapped(thing)
|
||||
w.prev_search = query
|
||||
w.recent = recent
|
||||
w.sort = sort
|
||||
|
||||
if isinstance(thing, Link):
|
||||
w.render_class = SearchResultLink
|
||||
elif isinstance(thing, Subreddit):
|
||||
|
||||
Reference in New Issue
Block a user