limit single number search to documents

This commit is contained in:
Frédéric Péters 2012-06-04 09:31:23 +02:00
parent ca0c69af5d
commit 7868deb46e
1 changed files with 6 additions and 5 deletions

View File

@ -124,14 +124,15 @@ class SimpleSearchView(BrowserView):
try:
int(search_query)
except ValueError:
kwargs = {'SearchableText': search_query}
else:
kwargs = {'nodoc': search_query}
c = catalog(
c = catalog(
portal_type=['tabellio.documents.dossier',
'tabellio.documents.document',
'tabellio.documents.question'],
**kwargs)
SearchableText=search_query)
else:
c = catalog(
portal_type=['tabellio.documents.document'],
nodos=search_query)
if sorton == 'session':
cmpf = cmpfunctions.Cmp().cmp_session
elif sorton == 'type':