summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/ajax.py
diff options
context:
space:
mode:
Diffstat (limited to 'pgcommitfest/commitfest/ajax.py')
-rw-r--r--pgcommitfest/commitfest/ajax.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pgcommitfest/commitfest/ajax.py b/pgcommitfest/commitfest/ajax.py
index 75fbc76..643af70 100644
--- a/pgcommitfest/commitfest/ajax.py
+++ b/pgcommitfest/commitfest/ajax.py
@@ -49,11 +49,12 @@ def getThreads(request):
search = request.GET.has_key('s') and request.GET['s'] or None
# Make a JSON api call to the archives server
- r = _archivesAPI('/list/pgsql-hackers/latest.json', {'n': 100, 'a': 1})
+ params = {'n': 100, 'a': 1}
if search:
- return sorted([x for x in r if x['subj'].lower().find(search)>=0 or x['from'].lower().find(search)>=0], key=lambda x: x['date'], reverse=True)
- else:
- return sorted(r, key=lambda x: x['date'], reverse=True)
+ params['s'] = search
+
+ r = _archivesAPI('/list/pgsql-hackers/latest.json', params)
+ return sorted(r, key=lambda x: x['date'], reverse=True)
def parse_and_add_attachments(threadinfo, mailthread):