Permalink
Browse files

Make /r/mod/comments work correctly instead of being the same as /r/a…

…ll/comments.
  • Loading branch information...
1 parent 3bf0d69 commit 67ba9a88b08b9f5d24984cd04c92d08822d99753 @Deimos committed Mar 31, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 r2/r2/models/subreddit.py
View
6 r2/r2/models/subreddit.py
@@ -935,6 +935,12 @@ def sr_ids(self):
def get_links(self, sort, time):
return self.get_links_sr_ids(self.sr_ids, sort, time)
+
+ def get_all_comments(self):
+ from r2.lib.db.queries import get_sr_comments, merge_results
+ srs = Subreddit._byID(self.sr_ids, return_dict=False)
+ results = [get_sr_comments(sr) for sr in srs]
+ return merge_results(*results)
class ModSR(ModContribSR):
name = "communities you moderate"

0 comments on commit 67ba9a8

Please sign in to comment.