From 0ff24a4b58b13c2987811b336030eb617911d850 Mon Sep 17 00:00:00 2001 From: doubaniux Date: Sat, 28 Nov 2020 01:50:38 +0100 Subject: [PATCH] fix bug of searching based on tags --- common/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/views.py b/common/views.py index 2a865301..919d8f68 100644 --- a/common/views.py +++ b/common/views.py @@ -103,7 +103,7 @@ def search(request): # test if user input an URL, if so jump to URL handling function url_validator = URLValidator() - input_string = request.GET.get('q').strip() + input_string = request.GET.get('q', default='').strip() try: url_validator(input_string) # validation success