[search] Strip default. prefix of collection names when browsing them
import json
import logging
+import re
from django.core.urlresolvers import reverse
from django.utils.html import escape
@@ -158,6 +159,9 @@ def browse(request, name, is_mobile=False):
engine = request.GET.get('engine', 'solr')
source = request.GET.get('source', 'data')
+ if engine == 'solr':
+ name = re.sub('^default\.', '', name)
+
collections = get_engine(request.user, engine, source=source).datasets()
if not collections and engine == 'solr':
return no_collections(request)
