Strip query when searching Vulnerability
@@ -126,6 +126,7 @@ class VulnerabilitySearch(ListView):
def get_queryset(self, query=None):
query = query or self.request.GET.get("search") or ""
qs = self.model.objects
+ query = query.strip()
if not query:
return qs.none()
@@ -207,7 +208,6 @@ class VulnerabilityDetails(DetailView):
context["severities"] = list(self.object.severities)
return context
-
class HomePage(View):
template_name = "index.html"
