Commit 42265975 authored by David Mendez's avatar David Mendez
Browse files

Eubopen: include current responses in entity suggestions

parent 76e6f2d5
......@@ -12,13 +12,15 @@ def get_suggestions_for_term(term):
"""
autocomplete_config = RUN_CONFIG.get('eubopen', {}).get('search', {}).get('suggestions', {}).get('entities', {})
all_suggestions = {}
entity_suggestions = {}
for entity_key, entity_config in autocomplete_config.items():
entity_suggestions = get_suggestions(term, entity_config)
all_suggestions[entity_key] = entity_suggestions
entity_suggestions[entity_key] = entity_suggestions
return all_suggestions
return {
'entity_suggestions': entity_suggestions,
}
def get_suggestions(term, entity_config):
......
Markdown is supported
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