summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@0d.be>2012-06-04 07:31:23 (GMT)
committerFrédéric Péters <fpeters@0d.be>2012-06-04 07:31:23 (GMT)
commit7868deb46e98c18bbc7d3d3402d2becee4950fb2 (patch)
treea683d319ecb2a842e0bf8a8515c58a334db11634
parentca0c69af5d6e08ba26857df18c2c19bb1940741d (diff)
downloadtabellio.searchform-7868deb46e98c18bbc7d3d3402d2becee4950fb2.zip
tabellio.searchform-7868deb46e98c18bbc7d3d3402d2becee4950fb2.tar.gz
tabellio.searchform-7868deb46e98c18bbc7d3d3402d2becee4950fb2.tar.bz2
limit single number search to documents
-rw-r--r--tabellio/searchform/simple.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tabellio/searchform/simple.py b/tabellio/searchform/simple.py
index 65e3ce1..540a618 100644
--- a/tabellio/searchform/simple.py
+++ b/tabellio/searchform/simple.py
@@ -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':