allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [20/23] git commit: [#7278] ticket:638 Don't try to show projects that are not in mongo
Date Wed, 20 Aug 2014 07:10:59 GMT
[#7278] ticket:638 Don't try to show projects that are not in mongo


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2eb8319d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2eb8319d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2eb8319d

Branch: refs/heads/je/42cc_7278
Commit: 2eb8319dc41b9977f7ee3ebea106befab8e90998
Parents: b055367
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Aug 19 13:06:48 2014 +0000
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Tue Aug 19 13:06:48 2014 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/site_admin.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2eb8319d/Allura/allura/controllers/site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/site_admin.py b/Allura/allura/controllers/site_admin.py
index baa53ae..a69716a 100644
--- a/Allura/allura/controllers/site_admin.py
+++ b/Allura/allura/controllers/site_admin.py
@@ -300,7 +300,9 @@ class SiteAdminController(object):
                 for i in range(len(projects)):
                     p = projects[i]
                     _id = p['id'].split('#')[1]
-                    p['project'] = mongo_projects[_id]
+                    p['project'] = mongo_projects.get(_id)
+                # Some projects can be deleted, but still have index in solr, should skip
those
+                projects = [p for p in projects if p.get('project')]
 
         def convert_fields(p):
             # throw the type away (e.g. '_s' from 'url_s')


Mime
View raw message