You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/10/01 22:42:18 UTC
[3/6] git commit: [#6431] ticket:430 Fix possible count() call on list
[#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/master
Commit: 9d0d9968d63a7f0e976a578413ffa5ac8c9b1203
Parents: f55c8bd
Author: Igor Bondarenko <je...@gmail.com>
Authored: Mon Sep 23 15:42:06 2013 +0300
Committer: Dave Brondsema <db...@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()