[editor] Allow Solr autocomplete even if Solr SQL is not enabled
@@ -224,6 +224,7 @@ def get_api(request, snippet):
return OozieApi(user=request.user, request=request)
interpreter = [interpreter for interpreter in get_ordered_interpreters(request.user) if interpreter['type'] == snippet['type']]
+ if not interpreter:
if snippet['type'] == 'hbase':
interpreter = [{
'name': 'hbase',
@@ -232,7 +233,15 @@ def get_api(request, snippet):
'options': {},
'is_sql': False
}]
- elif not interpreter:
+ elif snippet['type'] == 'solr':
+ interpreter = [{
+ 'name': 'solr',
+ 'type': 'solr',
+ 'interface': 'solr',
+ 'options': {},
+ 'is_sql': False
+ }]
+ else:
raise PopupException(_('Snippet type %(type)s is not configured in hue.ini') % snippet)
interpreter = interpreter[0]
interface = interpreter['interface']
