incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [3/3] git commit: [#5007] remove unneeded ForumThread queries
Date Thu, 27 Sep 2012 19:34:25 GMT
[#5007] remove unneeded ForumThread queries


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3a489c9f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3a489c9f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3a489c9f

Branch: refs/heads/db/5007
Commit: 3a489c9f60afda22c2cb48dc3c14ecbab1404dba
Parents: e39d6fa
Author: Dave Brondsema <dbrondsema@geek.net>
Authored: Thu Sep 27 18:19:59 2012 +0000
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Thu Sep 27 18:19:59 2012 +0000

----------------------------------------------------------------------
 .../forgediscussion/controllers/root.py            |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3a489c9f/ForgeDiscussion/forgediscussion/controllers/root.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py
index 8a8158c..8b8d979 100644
--- a/ForgeDiscussion/forgediscussion/controllers/root.py
+++ b/ForgeDiscussion/forgediscussion/controllers/root.py
@@ -60,12 +60,7 @@ class RootController(BaseController, DispatchIndex):
                         app_config_id=c.app.config._id,
                         parent_id=None, deleted=False)).all()
         forums = [f for f in forums if h.has_access(f, 'read')()]
-        threads = dict()
-        for forum in forums:
-            threads[forum._id] = model.ForumThread.query.find(dict(
-                discussion_id=forum._id, num_replies={'$gt': 0})).sort('mod_date', pymongo.DESCENDING).limit(6).all()
         return dict(forums=forums,
-                    threads=threads,
                     announcements=announcements,
                     hide_forum=(not new_forum))
 


Mime
View raw message