[Pkg-debile-commits] [debile-web] 01/04: Improve the code search

Sylvestre Ledru sylvestre at moszumanska.debian.org
Wed Dec 18 10:56:40 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch update-usuability
in repository debile-web.

commit 6a2609784d9c5ae8da4a3dfce815325946004656
Author: Sylvestre Ledru <sylvestre at debian.org>
Date:   Tue Dec 17 21:02:59 2013 +0100

    Improve the code search
---
 debileweb/blueprints/frontend.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debileweb/blueprints/frontend.py b/debileweb/blueprints/frontend.py
index dbbb0b1..9dc9c53 100644
--- a/debileweb/blueprints/frontend.py
+++ b/debileweb/blueprints/frontend.py
@@ -446,7 +446,7 @@ def search_package():
     search = request.args.get('search[term]')
     session = Session()
     packages_query = session.query(Source.name)\
-        .filter(Source.name.like(search+"%")).group_by(Source.name).limit(10)
+        .filter(Source.name.startswith(search)).group_by(Source.name).limit(10)
     result = [r[0] for r in packages_query]
     return jsonify(result)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-web.git



More information about the Pkg-debile-commits mailing list