summaryrefslogtreecommitdiffstats
path: root/askbot/utils
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-06-26 02:54:46 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-06-26 02:54:46 -0400
commit61fa8167c845d13814ccdff73ebca5453316da6d (patch)
tree30a5a1bd9fa3d97946ba505c8c849b485740b654 /askbot/utils
parent746eef31704e1096eabaa7dafd15535a09b924a3 (diff)
downloadaskbot-61fa8167c845d13814ccdff73ebca5453316da6d.tar.gz
askbot-61fa8167c845d13814ccdff73ebca5453316da6d.tar.bz2
askbot-61fa8167c845d13814ccdff73ebca5453316da6d.zip
added fix for the tag addition with category tree on and empty tree
Diffstat (limited to 'askbot/utils')
-rw-r--r--askbot/utils/category_tree.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/askbot/utils/category_tree.py b/askbot/utils/category_tree.py
index 049315dc..4406bdfd 100644
--- a/askbot/utils/category_tree.py
+++ b/askbot/utils/category_tree.py
@@ -76,6 +76,8 @@ def _get_leaf_names(subtree):
def get_leaf_names(tree = None):
"""returns set of leaf names"""
data = tree or get_data()
+ if data is None:
+ return set()
return _get_leaf_names(data[0][1])
def path_is_valid(tree, path):