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 2014/05/09 23:42:36 UTC
[16/18] git commit: [#7257] handle error case on deleted project
[#7257] handle error case on deleted project
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/6080f114
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/6080f114
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/6080f114
Branch: refs/heads/db/7257
Commit: 6080f114888a36a7cf618a8be08f4101a06ee95c
Parents: 1a26412
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 9 19:30:55 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 9 19:30:55 2014 +0000
----------------------------------------------------------------------
Allura/allura/model/project.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/6080f114/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 5d6b78b..3b060ea 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -1000,12 +1000,17 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
def index(self):
provider = plugin.ProjectRegistrationProvider.get()
+ try:
+ _private = self.private
+ except Exception:
+ log.warn('Error getting self.private on project {}'.format(self.shortname), exc_info=True)
+ _private = False
fields = dict(id=self.index_id(),
title='Project %s' % self.name,
type_s=self.type_s,
deleted_b=self.deleted,
# Not analyzed fields
- private_b=self.private,
+ private_b=_private,
category_id_s=str(self.category_id or ''),
neighborhood_id_s=str(self.neighborhood_id),
url_s=h.absurl(self.url()),