mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Update categories/templatetags/category_tags.py
Added NoneType check to display_drilldown_as_ul on line 188 to fix NoneType error.
This commit is contained in:
parent
59c3e27134
commit
fb6fb4e6f5
1 changed files with 4 additions and 1 deletions
|
|
@ -184,7 +184,10 @@ def display_drilldown_as_ul(category, using='categories.Category'):
|
|||
</ul>
|
||||
"""
|
||||
cat = get_category(category, using)
|
||||
return {'category': cat, 'path': drilldown_tree_for_node(cat) or []}
|
||||
if cat is None:
|
||||
return {'category': cat, 'path': []}
|
||||
else:
|
||||
return {'category': cat, 'path': drilldown_tree_for_node(cat)}
|
||||
|
||||
|
||||
@register.inclusion_tag('categories/ul_tree.html')
|
||||
|
|
|
|||
Loading…
Reference in a new issue