You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/02/01 15:31:12 UTC

allura git commit: fixup! [#8182] Improvements to Category/Trove admin

Repository: allura
Updated Branches:
  refs/heads/kt/8182 a015d38a4 -> d6ca29cc9


fixup! [#8182] Improvements to Category/Trove admin


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

Branch: refs/heads/kt/8182
Commit: d6ca29cc9975fd0c7df9564a3db40779fc265559
Parents: a015d38
Author: Kenton Taylor <kt...@slashdotmedia.com>
Authored: Thu Feb 1 15:23:13 2018 +0000
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Thu Feb 1 15:23:13 2018 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py               | 3 ++-
 Allura/allura/tests/functional/test_admin.py | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d6ca29cc/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index a928bc4..7eac462 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -296,7 +296,8 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
         return result
 
     def troves_by_type(self, trove_type):
-        troves = getattr(self, trove_type) if hasattr(self, trove_type) else None
+        trove_key = 'trove_%s' % trove_type
+        troves = getattr(self, trove_key) if hasattr(self, trove_key) else None
         if troves:
             return TroveCategory.query.find({'_id': {'$in': troves}}).all()
         else:

http://git-wip-us.apache.org/repos/asf/allura/blob/d6ca29cc/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index 9900e27..4fc0023 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -552,7 +552,6 @@ class TestProjectAdmin(TestController):
         setup_trove_categories()
 
         r = self.app.get('/admin/trove')
-        print r
         assert 'No Database Environment categories have been selected.' in r
         assert '<span class="trove_fullpath">Database API</span>' not in r
         # add a cat