incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] git commit: [#6431] ticket:430 Fix possible count() call on list
Date Wed, 25 Sep 2013 21:57:44 GMT
Updated Branches:
  refs/heads/db/6431 [created] a800eef0f


[#6431] ticket:430 Fix possible count() call on list


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

Branch: refs/heads/db/6431
Commit: 8d1b52a0f2ae1a160937a1c0ac0ebcbcbe65f478
Parents: dfd8b5e
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Sep 23 15:42:06 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Sep 25 20:53:25 2013 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/auth.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8d1b52a0/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index 50b550f..6562d6e 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -495,7 +495,7 @@ class UserSkillsController(BaseController):
         elif self.category:
             selected_skill = self.category
         else:
-            l = M.TroveCategory.query.find(dict(trove_parent_id=0, show_as_skill=True))
+            l = M.TroveCategory.query.find(dict(trove_parent_id=0, show_as_skill=True)).all()
             selected_skill = None
         if selected_skill:
             l = [scat for scat in selected_skill.subcategories
@@ -511,7 +511,7 @@ class UserSkillsController(BaseController):
             selected_skill = selected_skill,
             parents = parents,
             menu = menu,
-            add_details_fields=(l.count() == 0))
+            add_details_fields=(len(l) == 0))
 
     @expose()
     @require_post()


Mime
View raw message