Commit bd01b00c authored by Lucia Espona's avatar Lucia Espona
Browse files

fixed bug when searching in an organization with no children

parent e96549a0
......@@ -113,9 +113,9 @@ class HierarchyDisplay(p.SingletonPlugin):
base_query += [item]
if c.include_children_selected:
# add all the children organizations in an 'or' join
search_params['q'] = " ".join(base_query)
children = _children_name_list(helpers.group_tree_section(c.group_dict.get('id'), include_parents=False, include_siblings=False).get('children',[]))
if(children):
search_params['q'] = " ".join(base_query)
if (len(search_params['q'].strip())>0):
search_params['q'] += ' AND '
search_params['q'] += '(organization:%s' % c.group_dict.get('name')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment