incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [03/17] git commit: [#6431] ticket:430 Fix possible count() call on list
Date Thu, 03 Oct 2013 18:05:13 GMT
[#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/9d0d9968
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9d0d9968
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9d0d9968

Branch: refs/heads/cj/5561
Commit: 9d0d9968d63a7f0e976a578413ffa5ac8c9b1203
Parents: f55c8bd
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Sep 23 15:42:06 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Oct 1 20:40:41 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/9d0d9968/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