From: Marek Stępniowski Date: Tue, 7 Oct 2008 10:58:45 +0000 (+0200) Subject: Fixed bug when tags_starting_with view was called without q query param. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/f5a760d1ac2e637b970fdc2b664ab14072cdc468?ds=inline;hp=-c Fixed bug when tags_starting_with view was called without q query param. --- f5a760d1ac2e637b970fdc2b664ab14072cdc468 diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index c9d6ab227..f284e0a59 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -157,7 +157,7 @@ def search(request): def tags_starting_with(request): - prefix = request.GET['q'] + prefix = request.GET.get('q', '') # Prefix must have at least 2 characters if len(prefix) < 2: return HttpResponse('')