You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/12/20 19:51:02 UTC
[36/36] git commit: [#6388] avoid 1 mongo query in test controller
setup
[#6388] avoid 1 mongo query in test controller setup
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8474a348
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8474a348
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8474a348
Branch: refs/heads/db/6388
Commit: 8474a348d5596ef23b090eae8ee29f0b1b8e3ab0
Parents: 573781c
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Dec 19 18:30:41 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Dec 20 17:41:50 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/basetest_project_root.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8474a348/Allura/allura/controllers/basetest_project_root.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/basetest_project_root.py b/Allura/allura/controllers/basetest_project_root.py
index b73a851..ceb597b 100644
--- a/Allura/allura/controllers/basetest_project_root.py
+++ b/Allura/allura/controllers/basetest_project_root.py
@@ -67,9 +67,12 @@ class BasetestProjectRootController(WsgiDispatchController, ProjectController):
def __init__(self):
for n in M.Neighborhood.query.find():
- if n.url_prefix.startswith('//'): continue
+ if n.url_prefix.startswith('//'):
+ continue
n.bind_controller(self)
- self.p_nbhd = M.Neighborhood.query.get(name='Projects')
+ if n.url_prefix == '/p/':
+ self.p_nbhd = n
+
proxy_root = RootController()
self.dispatch = DispatchTest()
self.security = SecurityTests()