allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [18/20] git commit: [#7257] handle error case on deleted project
Date Wed, 21 May 2014 14:45:06 GMT
[#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 <dbrondsema@slashdotmedia.com>
Authored: Fri May 9 19:30:55 2014 +0000
Committer: Dave Brondsema <dbrondsema@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()),


Mime
View raw message