You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/09/24 19:08:15 UTC
[36/50] git commit: [#5822] allow routing to nbhd tools if the tool
mount point is not a vaild project name
[#5822] allow routing to nbhd tools if the tool mount point is not a vaild project name
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a897dc77
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a897dc77
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a897dc77
Branch: refs/heads/cj/6422
Commit: a897dc77d0ab7762de00d67ae9852306689d98b7
Parents: 1531d7a
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Sep 11 15:59:19 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Sep 23 16:27:12 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/project.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a897dc77/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 9914dc9..e2c7ee8 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -85,9 +85,10 @@ class NeighborhoodController(object):
provider = plugin.ProjectRegistrationProvider.get()
try:
provider.shortname_validator.to_python(pname, check_allowed=False, neighborhood=self.neighborhood)
- except Invalid as e:
- raise exc.HTTPNotFound, pname
- project = M.Project.query.get(shortname=self.prefix + pname, neighborhood_id=self.neighborhood._id)
+ except Invalid:
+ project = None
+ else:
+ project = M.Project.query.get(shortname=self.prefix + pname, neighborhood_id=self.neighborhood._id)
if project is None and self.prefix == 'u/':
# create user-project if it is missing
user = M.User.query.get(username=pname, disabled=False)