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/21 16:45:06 UTC

[18/20] 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/3760cd94
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3760cd94
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3760cd94

Branch: refs/heads/master
Commit: 3760cd94027838c4ef49bc394688201cf8ed5af3
Parents: 918f0bc
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 9 19:30:55 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed May 21 14:44:22 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/3760cd94/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 5c9cfa4..45bb551 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -1031,12 +1031,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()),