allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [27/42] git commit: [#7278] ticket:638 Don't try to show projects that are not in mongo
Date Mon, 25 Aug 2014 11:33:47 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/5680be0a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/5680be0a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/5680be0a

Branch: refs/heads/je/42cc_7585
Commit: 5680be0a9cb46add7322070b08c3671a3f55745b
Parents: fc753e0
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Aug 19 13:06:48 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Aug 21 18:49:56 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/5680be0a/Allura/allura/controllers/site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/site_admin.py b/Allura/allura/controllers/site_admin.py
index d92188d..4a96298 100644
--- a/Allura/allura/controllers/site_admin.py
+++ b/Allura/allura/controllers/site_admin.py
@@ -314,7 +314,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